
! script name: pksolids.d/pkcontplnbody
! solids: construct a sheet body from a contour

!A
!A NAME:
!A
!A 	Contour Sheet
!A
!A DESCRIPTION:
!A
!A	This script makes a sheet body which corresponds to the interior of
!A	a closed contour.
!A
!A~ image location - images/pkcontoursheet.gif
!A
!B INSTRUCTIONS:
!B
!B	PICK CONTOUR: Pick the synergy contour to be used.
!B 		This contour is unchanged by this operation.
!B
!C NOTES:
!C	
!C	The contour must not be self crossing. An open contour will
!C	automatically be closed by joining the end points.
!C
!C	The contour must be contained in a plane.
!C
!# see also - htdocs/help.d/parasolids.htm

Stat=ChangeLabelStr("ScriptNameStatus","Function: contour sheet body")

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

ActivateUndo

Stat= GLPlotOn
Pick_contour:!
Contour=PickGroupEnt("PICK CONTOUR ")
IF (ExitScript(Destination$)) THEN Leave


WPKClearErrorFlag
Pkbody=WPKContPlaneBody(Contour)
Stat= DeleteEntity(Pc)

ActivateUndo
Stat= AdvanceUndoNumber("contour sheet body")
Stat= AddItemToUndo(WsUBPKSessionMark)
WPKErrorCheck
GOTO Pick_contour

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