Synopsis
PDX_MSGT gdx_TestCurveSelfIntersect(long option, MDA_PTR gdx_curve_ptr, double approx_tol, PDX_BOOL *intersect_flg)
Purpose
Test GDX Curve for self intersections
Description
This function locates points of self intersection, if any, within a GDX Curve. The curve is linearly approximated (using GDX_TOLERANCE method) and the resulting segments are checked relative to each other for intersections. The number of intersections and their corresponding parameter values are returned.
The following curve types are supported:
.nf GDX_ARC GDX_COMP_CURVE GDX_CONIC GDX_POLYLINE GDX_SPLINE_CURVE GDX_NURB_CURVE GDX_OFFSET_CURVE GDX_TRIM_CURVE .fi
Input
option
GDX_PARM_SPACE
Indicates that the GDX Curve to be checked is 2D (xy)
gdx_curve_ptr
The database pointer of the GDX Curve entity to be checked for self intersection
approx_tol
The linear approximation tolerance
Output
intersect_flg
PDX_TRUE
The curve does self intersect
PDX_FALSE
The curve does NOT self intersect
Tolerances
GDX PARALLEL_LINES_TOL
GDX PARM_SPACE_PNT_TOL
GDX MODEL_SPACE_PNT_TOL
.fi
Return
GDX_NOERR
GDX_ENTITYNOTCURVE
Low level error return
.fi