
! script name: parasolids.d/pkparamhatch
! solids: assign a parametric hatch attribute

!A
!A NAME:
!A
!A 	Face Parameter Lines
!A
!A DESCRIPTION:
!A
!A	The parameter hatch is similar to the patch density in
!A	synergy surfaces.
!A
!A~ image location - images/pkparamhatch.gif
!A
!# see also - htdocs/help.d/parasolids.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: assign param hatch ")

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

ActivateUndo
U_density: !
Stat= SetEqualsValue(1)
Stat=SetInputFormat("n4=","")
Udensity=GetValue("U DENSITY")
IF ExitScript(Destination$) THEN Leave

V_density: !
Stat= SetEqualsValue(1)
Stat=SetInputFormat("n4=","")
Vdensity=GetValue("V DENSITY")
IF ExitScript(Destination$) THEN Leave


Face_loop:!
Stat=SetInputFormat("a1",",N,")
E1=WPKPickEntity("PICK FACE   New density ",WsPKPickFace,Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$="N" THEN U_density
IF NOT WPKIsEntity(E1) THEN Face_loop


Stat= WPKSetParamHatch(E1,Udensity,Vdensity)

ActivateUndo
Stat= AdvanceUndoNumber("parameter hatch")
Stat= AddItemToUndo(WsUBPKSessionMark)
RefineAll

GOTO Face_loop

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