
! script name: 3dcpaths.d/extalledges
! 3dtopic: auto edge extension of all surface edges in a part

!A
!A NAME:
!A
!A 	Auto edge extension: Part Edges On
!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 Surface_dir$[80]

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

Stat=Highlight(Part_group,WsPickPen,WsDirArrowOff)
Stat=SetPickMask(WsPickGeometry)
Num_surfs=GroupCount(Part_group)
FOR I=1 TO Num_surfs
	Surface=GroupElement(Part_group,I)
	Stat=SetEdgeExt(Surface,0)
NEXT I
GOTO Pick_loop

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