Assumption parameters - HiStructClient/femcad-doc GitHub Wiki

Assumption parameters is a feature that allows the PVC in arrays to be automaticaly removed (reset to default).

The definition goes into InputItemArray:

roofBoundaries := res.fit.InputItemArray{
	HumanName         := "Roof boundaries",
   EditableCount     := True,
   InputTypes        := [ act.sheeting.roofBoundaryInputType.inputItem ],
   AssumptionParameters := [ "roofBoundariesCount" ],
   AssumptionCondition  := "o,n => o[0]==n[0]",   
}

Assumption condition refers to the lambda by which the PVC is valid. In this case the "o" (old) parameter (in here roofBoundariesCount) must be the same as new parameter.

Its also possible to modify the lambda function i.e.: PVC should be edited only when the new array count is shorter than the old one.

rafterTypes := res.fit.InputItemArray{
	HumanName      := "ClassTypePrimaryFrameRafterTypesName",
Identifier        := "inRafterTypes",
	EditableCount     := True,
   EditInPlace       := True, 
   EditDisableDelete := True,
   InputTypes        := structure.rafterTypeInputClasses,
   AssumptionParameters := [ "raftersCount" ],
   AssumptionCondition  := "o,n => o[0]>=n[0]",   
}

It should also be possible to include another parameters:

   AssumptionParameters := [ "raftersCount", "columnsCount" ],
   AssumptionCondition  := "o,n => o[0]>=n[0] and o[1]>=n[1]",