
! script name: 3dcpaths.d/surfedgesoff
! 3dtopic: turn off surface auto edge extension in 3d gouge

!A
!A NAME:
!A
!A 	Auto Edge Extension: Surface Edges Off
!A
!A DESCRIPTION:
!A
!A 	This script turns off the auto extension of edges on a surface
!A 	in 3d gouge.
!A
!B INSTRUCTIONS:
!B
!B 	PICK SURFACE: Pick the edge curve on surface.
!B

Stat=ChangeLabelStr("ScriptNameStatus","Function: surface auto edge extension off")

DIM Destination$[256]
DIM Answer$[256]
DIM Surface_dir$[80]

DeActivateUndo
Start:!
StdWorkplane

Pick_edge:StdWorkplane
Stat=SetPickMask(WsPickSurfOnly)
Stat=SetInputFormat("n0","")
Surface=PickEntity("PICK SURFACE ",Answer$)
IF ExitScript(Destination$) THEN Leave
IF NOT ValidGeometry(Surface) THEN Pick_edge

Stat=SetPickMask(WsPickGeometry)

Stat=UnSetEdgeExt(Surface,0)

GOTO Pick_edge

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