
! script name: 3dtrim.d/deltrimcurve
! 3dtopic: delete trim curve

!A
!A NAME:
!A
!A 	Delete Trim Curve
!A
!A DESCRIPTION:
!A
!A 	This script allows a trim curve to be deleted.  
!A
!B INSTRUCTIONS:
!B
!B 	PICK SURFACE: Pick the surface along the trim curve to be deleted.
!B

Stat=ChangeLabelStr("ScriptNameStatus","Function: delete trim curve")

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

ActivateUndo
Start:!

Stat=SetPickMask(WsPickSurfOnly)
Stat=SetInputFormat("n0","")
Surface=PickEntity("PICK SURFACE",Answer$)
IF ExitScript(Destination$) THEN Leave
IF NOT ValidGeometry(Surface) THEN Pick_loop
Which1=LastSurfTrimPick(Surface)
IF Which1 THEN
	ActivateUndo
	Stat= AdvanceUndoNumber("del trim curve")
	Stat= AddItemToUndo(WsUBModifyMode,Surface)

	Stat=RemoveTrimCurve(Surface,Which1)
END IF
Stat=SetPickMask(WsPickGeometry)

GOTO Start

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