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

!A
!A NAME:
!A
!A 	Auto edge extension: Surface Edges On
!A
!A DESCRIPTION:
!A	
!A 	This script turns on the auto extension of all edges on a surface, and
!A 	is used in association with the gouge check routines.  Selected edges
!A 	will extend tangentially from the surface and roll the normal vector
!A 	through 90 deg of arc.
!A
!B INSTRUCTIONS:
!B
!B 	PICK  SURFACE: Pick the surface.
!B

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

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

Var_object= CheckVarObject
IF (ExitScript(Destination$)) THEN Leave

DeActivateUndo
Start:!

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

Stat=SetPickMask(WsPickGeometry)

RecordFunctionOn
Stat= RecordDescr("PROPERTY: Set Surface Auto Edge Ext")
Stat= NullReference(Surface$)
Stat=SetEdgeExt(Surface$,0)
RecordFunctionOff
CloseVarRecord

GOTO Pick_edge

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