
! script name: parasolids.d/setgraphres
! solids: set graphics resolution for the solid modeler

!A
!A NAME:
!A
!A 	Graphics Resolution
!A
!A DESCRIPTION:
!A
!A 	This script sets the graphics resolution factor.
!A
!A	The settings are:
!A
!A		L  for Low
!A		D  for Default
!A		H  for High
!A		F  for Fine
!A		V  for Very fine
!A		X  for Xtra fine   only use for very tiny parts
!A
!# see also - htdocs/help.d/parasolids.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: set resolution ")

OPTION BASE 1
DIM Destination$[256]
DIM Answer$[256]


Start:!
Stat= SetEqualsValue(0,"D")
Stat=SetInputFormat("a1=",",L,D,H,F,V,X,S,")
Stat=GetValue("RESOLUTION: Low, Default, High, Fine, Very fine ",Answer$)
IF ExitScript(Destination$) THEN Leave
SELECT Answer$
CASE "L"
	Stat= WPKSetGraphRes(2.0)
CASE "D"
	Stat= WPKSetGraphRes(1.0)
CASE "H"
	Stat= WPKSetGraphRes(0.375)
CASE "F"
	Stat= WPKSetGraphRes(0.125)
CASE "V"
	Stat= WPKSetGraphRes(0.0625)
CASE "X"
	Stat= WPKSetGraphRes(0.03)
END SELECT

RefineAll


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