
! script name: trim.d/cornerfillet2
! topic: Sample - construct corner fillet

!A
!A NAME:
!A
!A 	Corner Fillet (alternate)
!A
!A DESCRIPTION:
!A
!A 	This script constructs an arc of a circle which will be tangent to the
!A 	two elements picked.  This script assumes that once the fillet radius
!A 	has been defined, all subsequent radii will be the same.
!A
!A~ image location - images/cornerfillet.jpg
!B INSTRUCTIONS:
!B
!B 	FILLET RADIUS: Enter the radius of the arc that should be constructed
!B 		tangent to each element picked.
!B
!B 	PICK FIRST TANGENT ELEMENT: Pick one of the elements that should be
!B 		tangent to the arc constructed.
!B
!B 	PICK NEXT TANGENT ELEMENT: Pick the other element that should be
!B 		tangent to the arc constructed.
!B
!C NOTE:
!C
!C 	This is an unsupported sample script.
!C

stat=ChangeLabelStr("ScriptNameStatus","Function: corner fillet (alternate) ")

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


DEG
DeActivateUndo

Ask_radius:Stat= SetInputFormat("n4","")
Radius=InputRadius("FILLET RADIUS")
IF (ExitScript(Destination$)) THEN Leave

Ploop:!
Stat= SetInputFormat("a1",",N,")
E1=PickEntity("PICK FIRST TANGENT ELEMENT,  New radius",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$= "N" THEN Ask_radius
Para1=LastPickPara

Stat= SetInputFormat("n4","")
E2=PickEntity("PICK NEXT TANGENT ELEMENT")
IF (ExitScript(Destination$)) THEN Leave
Para2=LastPickPara


C1= PickFillet(Radius,e1,para1,e2,para2)

GOTO Ploop

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