
! script name: pksurfaces.d/pkfacesurface
! solids: make a sheet body from the untrimmed surface of a face

!A
!A NAME:
!A
!A 	Untrimmed Face Surface
!A
!A DESCRIPTION:
!A
!A	This script makes a sheet body from the untrimmed surface of a face.
!A
!B INSTRUCTIONS:
!B
!B	PICK FACE: Pick the parasolid face.
!B
!# see also - htdocs/help.d/parasolids.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: untrimmed face surface ")

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


ActivateUndo
Stat= GLPlotOn

Start:!

Ploop:!
Stat=SetInputFormat("n4","")
E1=WPKPickEntity("PICK FACE",WsPKPickFace)
IF (ExitScript(Destination$)) THEN Leave
IF NOT WPKIsEntity(E1) THEN Face_loop

WPKClearErrorFlag
E2= WPKFaceSurface(E1)

ActivateUndo
Stat= AdvanceUndoNumber("untrimmed face surface")
Stat= AddItemToUndo(WsUBPKSessionMark)
WPKErrorCheck
GOTO Ploop

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