
! script name: contours.d/circleapprox
! TOPIC: SAMPLE: Circle approximation contour

!A
!A NAME:
!A
!A 	CIRCLE APPROX CONTOUR
!A
!A DESCRIPTION:
!A
!A 	This script approximates a contour by circular arcs.
!A 	Do not use on a file already using circular arcs.
!A
!B INSTRUCTIONS:
!B
!B 	PICK CONTOUR TO BE APPROX: Pick the contour to be
!B 		approximated by circular arcs.
!B
!C NOTE:
!C
!C 	This is an unsupported sample script.
!C

stat=ChangeLabelStr("ScriptNameStatus","Function: circle approx contour ")

DIM Destination$[256]
DIM Answer$[256]


DeActivateUndo
Ploop:!
E1=PickGroupEnt("PICK CONTOUR TO BE APPROX",0)
IF (ExitScript(Destination$)) THEN Leave

Contour=CircleApprox(E1,.005)
Stat=Highlight(Contour,WsPickPen,WsDirArrowOn)

GOTO Ploop

Leave:!
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
