
! script name: surfaces.d/bicubicmethod
! topic: toggle surfaces on/off

!A
!A NAME:
!A
!A 	Bicubic surface method
!A
!A DESCRIPTION:
!A
!A 	This script changes the method of calculating bicubic patches.
!A
!A 	Method1: New way. Forces tangency along patch edges.
!A 		In general,  this is a superior method but
!A 		can in some instances give surface ripples. When this
!A 		occurs a wider patch width may improve surface.
!A
!A 	Method2: Default method. Maintains tangency at patch corners but can
!A 		allow slight deviation along the interiors of patch
!A 		edges. Generally a smaller patch width will minimize
!A 		this effect.
!A
!B NOTES:
!B
!B 	Both methods can give undesirable for long skinny patches with large
!B 	variations. If this occurs additional cross section may be required
!B 	or perhaps a nurb surface would be more appropriate.
!B
!B 	Method set does not in anyway affect Bicubic surfaces imported from
!B 	an IGES file.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: bicubic method ")

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


Method= 1
stat= SetEqualsValue(0,"1")
stat= SetInputFormat("a1=",",1,2,")
stat= GetValue("BICUBIC PATCH METHOD ( 1 ) or ( 2 ) ",Answer$)
IF (ExitScript(Destination$)) THEN Leave

SELECT Answer$
CASE "1"
	Method= 1
CASE "2"
	Method= 2
END SELECT


Stat=SetBicubicMethod(Method)


Leave:!
stat= SetInputFormat("n4","")
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
