
! script name: v3dcpaths.d/extalledges
! var_topic: auto edge extension of all surface edges in a part

!A
!A NAME:
!A
!A 	Auto edge extension: Part Edges On VARIATIONAL
!A
!A DESCRIPTION:
!A	
!A 	This script turns on the auto extension of all edges in a part, 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 GROUP: Pick the group of surfaces.
!B

Stat=ChangeLabelStr("ScriptNameStatus","Function: auto extend all edges")

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

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


DeActivateUndo
Start:!
Pick_loop:!
Stat=SetPickMask(WsPickSurfOnly)
Stat=SetInputFormat("n4","")
Part_group=PickGroupEnt("PICK SURFACE GROUP",WsSurfaceGroup)
IF ExitScript(Destination$) THEN Leave
IF NOT ValidDependency(Part_group) THEN Pick_loop
Stat= EntityNameCheck(Part_group,Part_group$)

Stat=Highlight(Part_group,WsPickPen,WsDirArrowOff)
Stat=SetPickMask(WsPickGeometry)

RecordFunctionOn
Stat= RecordDescr("PROPERTY: Turn Auto Edge Ext On")
Stat= NullReference(Part_group$)
Stat=SetEdgeExt(Part_group$,0)
RecordFunctionOff
CloseVarRecord

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