Algorithm for automatic positioning of patterned materials in cutting machines used in the textile industry