
! script name: var_fillet.d/setfilletsurf
! var_topic: set fillet edge conditions

!A
!A NAME:
!A
!A 	3D Settings: Set Fillet Surface Type. VARIATIONAL
!A
!A DESCRIPTION:
!A
!A 	This script sets if the fillet surfaces are created as
!A	bicubic or nurb surfaces.
!A


Stat=ChangeLabelStr("ScriptNameStatus","Function: set fillet surface type ")

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

Var_object= CheckVarObject
IF (ExitScript(Destination$)) THEN Leave

DeActivateUndo
Stat=SetInputFormat("a1=",",N,C,")
Stat=SetEqualsValue(0,"C")
Stat=GetValue("FILLET SURFACE TYPE: Cubic, Nurb",Answer$)
IF ExitScript(Destination$) THEN Leave
SELECT Answer$
CASE "N"
	Surf_type= WsNurbSurfEnt
CASE "C"
	Surf_type= WsCubicSurfEnt
END SELECT


RecordFunctionOn
Stat= RecordDescr("3D SETTING: Fillet Surface Type")
RecordFunctionOff
IF Surf_type= WsNurbSurfEnt THEN
	RecordFunctionOn
	Stat= SetFilletSurfType(WsNurbSurfEnt)
	RecordFunctionOff
ELSE
	RecordFunctionOn
	Stat= SetFilletSurfType(WsCubicSurfEnt)
	RecordFunctionOff
END IF
RecordFunctionOff
CloseVarRecord

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