Used with
MetaDataPlugin to store shrinkage rates for common pieces. See
Shrinkage Calculator.
Calculator
%STARTSECTION{"calc"}%
<div class='foswikiRight' style='font-size:1.2em;border:1px, black, solid;padding:1em;'>%ICON{"tip"}% *Use metric measurements (cm) as all results are rounded to closest one decimal(mm).*
See also [[https://bodhiswan.com/au/tools/throwing-forms][Interactive Clay Estimating Tool]] for a more sophisticated implementation.
</div>
<form action='%SCRIPTURL{"view"}%/%BASEWEB%/%BASETOPIC%'>
<div class='foswikiFormSteps' style='width:20em;'>
<div class='foswikiFormStep'>
*Calculate:* <br/>
<label><input type='radio' name='type' value='Target' %IF{"'%URLPARAM{"type" default="Target"}%'='Target'" then="checked='checked'"}% > Target Size %JQICON{"fa-arrow-right"}% Required Initial Size </input></label>
<br /><label><input type='radio' name='type' value='Initial' %IF{"'%URLPARAM{"type" default="Target"}%'='Initial'" then="checked='checked'"}% > Initial Size %JQICON{"fa-arrow-right"}% Estimated Final Size </input></label>
</div>
<div class='foswikiFormStep'>
*Clay Shrink Rate:* <select class='foswikiSelect' name='rate'>
%FORMATLIST{"10,11,12,13,14,15,16,17,18,19,20"
format=" <option class='foswikiOption' value='$1' $percntIF{\"'%URLPARAM{"rate" default="11"}%'='$1'\" then=\"selected\"}$percnt >$1%</option>"
separator="$n"
}%</select>
</div>
<div class='foswikiFormStep'>
*%URLPARAM{"type" default="Input"}% Width:* <input type='text' name='width' size='10' value='%URLPARAM{"width"}%'>
%IF{"isempty width"
else="<br /> *%IF{"'%URLPARAM{"type" default="Target"}%'='Target'" then="Required Inital" else="Estimated Final"}% Width:* "
}%%IF{"isempty width"
else="%IF{"'%URLPARAM{"type" default="Target"}%'='Target' and defined width"
then="$percntCALCULATE{\"$SET(width,$FORMAT(NUMBER, 0, $EVAL(%URLPARAM{"width"}%/.$EVAL($EVAL(100 - %URLPARAM{"rate"}%)))))$GET(width)\"}$percnt"
else="$percntCALCULATE{\"$SET(width,$FORMAT(NUMBER, 0, $EVAL(%URLPARAM{"width"}% - (%URLPARAM{"width"}% * .%URLPARAM{"rate"}%))))$GET(width)\"}$percnt"
}%"
}%
</div>
<div class='foswikiFormStep'>
*%URLPARAM{"type" default="Input"}% Height:* <input type='text' name='height' size='10' value='%URLPARAM{"height"}%'>
%IF{"isempty height"
else="<br /> *%IF{"'%URLPARAM{"type" default="Target"}%'='Target'" then="Required Inital" else="Estimated Final"}% Height:* "
}%%IF{"isempty height"
else="%IF{"'%URLPARAM{"type" default="Target"}%'='Target'"
then="$percntCALCULATE{\"$SET(height,$FORMAT(NUMBER, 0, $EVAL(%URLPARAM{"height"}%/.$EVAL($EVAL(100 - %URLPARAM{"rate"}%)))))$GET(height)\"}$percnt"
else="$percntCALCULATE{\"$SET(height,$FORMAT(NUMBER, 0, $EVAL(%URLPARAM{"height"}% - (%URLPARAM{"height"}% * .%URLPARAM{"rate"}%))))$GET(height)\"}$percnt"
}%"
}%
</div>
<div class='foswikiFormStep'>
%BUTTON{"Calculate" type="submit" icon="fa-calculator"}%
%IF{"defined height or defined width"
then="$percntBUTTON{\"Reset Form\" target=\"%BASEWEB%.%BASETOPIC%\" icon=\"fa-history\" }$percnt"
}%
</div></div>
</form>
%IF{"defined height or defined width"
then="$percntINCLUDE{\"Applications.LocalApps.PotteryShrinkageGuide\"
section=\"form\"
%URLPARAM{type}%_height=\"%URLPARAM{"height"}%\"
%URLPARAM{type}%_width=\"%URLPARAM{"width"}%\"
%IF{"'%URLPARAM{"type"}%'='Target'" then="Initial" else="Target"}%_height=\"%CALCULATE{"$GET(height)"}%\"
%IF{"'%URLPARAM{"type"}%'='Target'" then="Initial" else="Target"}%_width=\"%CALCULATE{"$GET(width)"}%\"
}$percnt"
}%
%ENDSECTION{"calc"}%
Save Guide
Included in
Shrinkage Calculator when calculation is rendered.
%STARTSECTION{"form"}%%TWISTY{
link="%BUTTON{
"Save this Calculation as Guide"
icon="fa-plus"
}%%CLEAR%"
mode="div"
}%<noautolink><div class='foswikiFormSteps' style='width:30em;'>
<form class='jqValidate' action='%SCRIPTURL{"save"}%/%BASEWEB%/%BASETOPIC%#Saved_Shrinkage_Guides' method='post'>
<input type="hidden" name="topic" value="%BASEWEB%.%BASETOPIC%" />
<input type="hidden" name="metadata" value="potteryshrinkageguide" />
%RENDERMETADATA{
"potteryshrinkageguide"
action="edit"
name="id"
hidden="(Shrinkage|TargetWidth|InitialWidth|TargetHeight|InitialHeight)"
Shrinkage_value="%URLPARAM{"rate"}%%"
TargetWidth_value="%Target_width%"
InitialWidth_value="%Initial_width%"
TargetHeight_value="%Target_height%"
InitialHeight_value="%Initial_height%"
}%
%BUTTON{"Save" type="submit"}%
</form></div></noautolink>
%ENDTWISTY%%ENDSECTION{"form"}%
Render saved guides
%STARTSECTION{"guides"}%
---++ Saved Shrinkage Guides
%RENDERMETADATA{"potteryshrinkageguide"}%
%ENDSECTION{"guides"}%