/* This file is part of the Neper software package. */
/* Copyright (C) 2003-2014, Romain Quey. */
/* See the COPYING file in the top-level directory. */

#include"net_flatten_poly_.h"

void
net_flatten_poly (struct MTESS MTess, struct TESS *Tess,
		  struct TESS *pFTess, struct TESSE **pTessE,
		  struct FLATTEN *pFlatten)
{
  int i;

  (*pFTess).PolyQty = 0;

  for (i = 1; i <= MTess.TessQty; i++)
  {
    (*pTessE)[i].PolyFPolyQty = ut_alloc_1d_int (Tess[i].PolyQty + 1);
    (*pTessE)[i].PolyFPolyNb = ut_alloc_1d_pint (Tess[i].PolyQty + 1);
  }

  net_flatten_cell_body (MTess, Tess, pFTess, pTessE, pFlatten);

  return;
}
