CPSET/CHORD,obj,tolerance,results
Creates a set of points along a curve using a specified chordal tolerance.
The resulting points represent ends of linear segments from which the corresponding section of the curve does not deviate more than the specified chordal tolerance.
NOTE: The resulting points are not "smart," meaning they are
not associative to the curve from which they were created. If the curve is
modified, the points do not change.
Parameter |
Description |
CHORD |
Minor word specifies the use of the chordal tolerance to create the point set. |
obj |
The object identifier of the curve on which the points are created. |
tolerance |
The chordal tolerance. |
results |
Array containing the identifiers for the newly created points. |
Creating a chordal tolerance point set.
ENTITY/CRV, PTS(1000)
NUMBER/CTOL, INDX, PTCNT, USRESP
INIT:
CTOL = 0.1
DO/I1:, INDX, 1, 1000
I1: PTS(INDX) = &NULENT
STEP1:
IDENT/'Select Curve', CRV, USRESP
JUMP/HALT:, HALT:, USRESP
STEP2:
PARAM/'Specify Chordal Tolerance', 'Tolerance = ', CTOL,&
USRESP
JUMP/STEP1:, HALT:, USRESP
STEP3:
CPSET/CHORD,CRV,CTOL,PTS
PTCNT = 0
DO/S3B:, INDX, 1, 1000
S3B: IF/PTS(INDX) <> &NULENT,PTCNT = PTCNT + 1
MESSG/'Number of Points Returned = ' + ISTR(PTCNT)
DO/S3C:, INDX, 1, PTCNT
IFTHEN/PTS(INDX) <> &NULENT,&
BLANK/PTS(INDX)
PTS(INDX) = &NULENT
ENDIF
S3C:
JUMP/STEP1:
HALT:
HALT