Synopsis

PDX_MSGT gcr_Polyline(long option, MDA_PTR orig_db_ptr, MDA_COUNT num_of_pnts, double (*points)[3], int gdx_model, MDA_PTR *gdx_PL_ptr)

Purpose

Create a GDX Polyline.

Description

This function may create a one or two point polyline, since no point or line entity exists in GDX.

If the polyline contains more than 2 distinct points and the first and last points are within GDX MODEL_SPACE_PNT_TOL, the GDX polyline is flagged as closed.

If the points are found to be planar within the current GDX COPLANAR_TOL and the definition plane is an XY plane and the Z distance is < GDX COPLANAR_TOL then the GDX polyline is flagged as XY planar and the Z coordinate value is ignored.

The orig_db_ptr argument should contain the database pointer of the entity that the new entity was created from (usually this should be obtained by the calling routine via mda_GetOrigDbptr) or MDA_NULL_PTR. See the mda_intro man page for more information about predecessor entities.

\fBRules\fR .IP • 3 num_of_pnts > 0 .LP

Input

option

GCR_NOVALIDATE

No validation will occur on the input data.

orig_db_ptr

The original entities orig_db_ptr as obtained from the mda_GetOrigDbptr call, or MDA_NULL_PTR

num_of_pnts

The number of points for the polyline

points

MDA array of memory containing the 3D XYZ point coordinates. points[num_of_points][3] Always consumed by this function even on error.

gdx_model

The GDX model for entity creation

Output

gdx_PL_ptr

Entity database pointer of the GDX Polyline

Return

      GCR_NOERR
      GCR_INVALID_MODEL
      GCR_POLY_NUM_OF_PNTS
      Low level error return
      .fi