
! script name: trim.d/cornertrim
! topic: trim two intersecting elements

!A
!A NAME:
!A
!A 	Corner Trim
!A
!A DESCRIPTION:
!A
!A 	This script allows two intersecting elements to be trimmed. For lines
!A	and circles non intersecting elements will be extended 
!A	to the intersection point.
!A
!A~ image location - images/trimtwo.jpg
!B INSTRUCTIONS:
!B
!B 	PICK FIRST ELEMENT TO BE TRIMMED: Pick one of the
!B 		intersecting elements to be trimmed.
!B
!B 	PICK NEXT ELEMENT TO BE TRIMMED: Pick the other
!B 		intersecting element to be trimmed.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: corner trim ")

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


DEG

Input_methodr= CurrInputMethod
Stat=SetXyzInput(WsCornerTrim)

ActivateUndo
Ploop:Pt=XyzInput("INPUT",WsXyzInput)
IF (ExitScript(Destination$)) THEN Leave
Stat=DeleteEntity(Pt)

GOTO Ploop

Leave:!
Stat=SetXyzInput(Input_methodr)
Stat=DeleteEntity(Pt)
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
