
! script name: 3dtrim.d/untrimsurf
! 3dtopic: untrim surface

!A
!A NAME:
!A
!A 	Untrim Surface
!A
!A DESCRIPTION:
!A
!A 	This script allows a surface to be untrimmed.
!A 	The original surface will be returned.
!A
!B INSTRUCTIONS:
!B
!B 	PICK SURFACE TO BE UNTRIMMED: Pick the surface
!B 		that should be untrimmed.
!B
!C NOTES:
!C
!C 	Untrim surface will remove all trim curves associated with the surface.
!C 	The desired trim curves for the surface must be redone.
!C

Stat=ChangeLabelStr("ScriptNameStatus","Function: untrim surface ")

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

DEG

ActivateUndo
Ploop:!

Stat=SetPickMask(WsPickSurfOnly)
E1=PickEntity("PICK SURFACE TO BE UNTRIMMED")
IF ExitScript(Destination$) THEN Leave
Stat=SetPickMask(WsPickAll)

ActivateUndo
Stat= AdvanceUndoNumber("untrim")
Stat= AddItemToUndo(WsUBModifyMode,E1)

E2=UnTrimEntity(E1)

GOTO Ploop

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