Production of components in composite material