
! script name: nurbs.d/nurbtobezier
! topic: Sample - converts a nurb surface to a bezier surface

!A
!A NAME:
!A
!A 	Convert a Nurb Surface to a Bezier Surface
!A
!A DESCRIPTION:
!A
!A 	converts a nurb surface to a bezier surface
!A
!B INSTRUCTIONS:
!B
!B 	NO HELP AVAILABLE AT THIS TIME
!B
!C NOTE:
!C
!C 	This is an unsupported sample script.
!C

stat=ChangeLabelStr("ScriptNameStatus","Function: nurb surf to bezier ")

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


ActivateUndo
Pick_loop:!

E1=PickEntity("PICK ELEMENT TO BE CONVERTED")
IF (ExitScript(Destination$)) THEN Leave

ActivateUndo
Stat= AdvanceUndoNumber("conv to bezier")
Stat= AddItemToUndo(WsUBModifyMode,E1)

Stat= NurbToBezierSurf(E1)

GOTO Pick_loop


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