
! script name: pkgroups.d/pkfacegroupbdy
! solids: explode the boundary contours of a face group

!A
!A NAME:
!A
!A 	Face Group Boundary
!A
!A DESCRIPTION:
!A
!A 	This script explodes the boundary contours of a face group
!A
!B INSTRUCTIONS:
!B
!B	PICK FACE GROUP: Pick the face group.
!B
!# see also - htdocs/help.d/pkgroups.htm
!# see also - htdocs/help.d/parasolids.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: face group boundary")

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

ActivateUndo

Stat= GLPlotOn
Start:!

E1=WPKPickEntity("PICK FACE GROUP")
IF (ExitScript(Destination$)) THEN Leave
IF NOT WPKIsEntity(E1) THEN Start

Pkgroup= WPKContainingGroup(E1,1,WsTrue)
IF NOT WPKIsEntity(Pkgroup) THEN Start

WPKClearErrorFlag
Group= WPKFaceGroupBdy(Pkgroup)

ActivateUndo
Stat= AdvanceUndoNumber("face group boundary")
Stat= AddItemToUndo(WsUBPKSessionMark)
Stat= AddGroupToUndo(WsUBCreateMode,Group,0,WsTrue)
Stat= DeleteEntity(Group)
WPKErrorCheck

GOTO Start

Leave:!
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
