Skip to main content

Function: isolateLayers()

isolateLayers(wefts, warps, floats, layer, cns, sim): ContactNeighborhood[]

Defined in: simulation/simulation.ts:1365

starting with the longest warp, this function searches for all the floats that would be affected (and then would subsequently affect others, if that warp was lifted) the degree or (height) to which it is lifted is specified by the "lift-limit" param in SimulationVars. This assigns layers sequentially, with 1 meaning it is the top layer (looking down on the cloth from above), 2 is the next layer under, 3 is under 2 and so on. a value of 0 means that that this CN was never visited by the algorithm. This function is called recursively as long as there are still floats to analyze.

Parameters

wefts

number

warps

number

floats

CNFloat[]

layer

number

cns

ContactNeighborhood[]

sim

SimulationVars

Returns

ContactNeighborhood[]