
! script name: 3dintersect.d/curveapprox
! 3DTOPIC: curve approximation data

!A
!A NAME:
!A
!A	CURVE APPROXIMATION DATA	 	
!A
!A DESCRIPTION:
!A
!A	Set up data for approximations of curves      
!A	
!A
!B INSTRUCTIONS:
!B
!B	Method= 0 : Curve is line segments.
!B	Method= 1 : Curve is interpolating bezier curves of degree Npoints-1.
!B	Method= 2 : Curve is interpolating bspline curves of fixed degree.
!B	Method= 3 : Curve is circular arcs or line segments.
!B	Method= 4 : Curve is approximating bezier curves of degree Npoints-1.
!B	Method= 5 : Curve is approximating bspline curves of fixed degree.
!B
!B	Npoints: Defines number of points used per curve segment.
!B		 Interpolation is not stable for npoints>10.
!B 		 Approximation uses points as control points for the curve.
!B
!B 	Pdeg:	Degree of interpolating/approximating basis polynomials.
!B	
!B	Tol:	Tolerance to be tolerated in circular approximation.
!B
!B
!B OPTIONS:
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: curve approx data ")

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

Start:!
Units= CurrentUnits
IF Units= WsMetric THEN 
	Tol= 0.125
ELSE
	Tol= 0.0005
END IF

Pdeg= 3
Npoints= 8
Method= 1

stat= SpaceCurveData(Method,Pdeg,Npoints,Tol)

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