public void calculateGisModel(DwgFile dwgFile) {
		if (getVertices() == null)
			return;
		int flags = getFlag();
		List pts = getVertices();
		double[] bulges = getBulges();
		List newPts = new ArrayList();
		double[] newBulges = null;
		if(bulges != null){
			newBulges = new double[bulges.length];
			System.arraycopy(bulges, 0, newBulges, 0, bulges.length);
		}else{
			bulges = new double[pts.size() ];
			newBulges = new double[bulges.length];
			//dwg spec says numVertex (numSegments + 1)
			//TODO Check this
			for(int i = 0; i < newBulges.length; i++)
				bulges[i] = 0d;
			newBulges = new double[bulges.length];
			System.arraycopy(bulges, 0, newBulges, 0, bulges.length);
		}
		// TODO: Aqu� pueden existir casos no contemplados ...
//        System.out.println("flags = " + flags);
        if (flags==512 || flags==776 || flags==768) {//closed
			newBulges = new double[bulges.length+1];
			for (int j=0;j<pts.size();j++) {
				newPts.add(pts.get(j));
			}
			newPts.add(pts.get(0));
			newBulges[pts.size()] = 0;
		} else {
			for (int j=0;j<pts.size();j++) {
				newPts.add(pts.get(j));
			}
		}
		if (newPts.size() > 0) {
			setBulges(newBulges);
			List points = GisModelCurveCalculator.calculateGisModelBulge(newPts, newBulges);
			setVertices(points);
		}
//		if (pts.size() > 0) {
//			setBulges(newBulges);
//			List points = GisModelCurveCalculator.calculateGisModelBulge(newPts, newBulges);
//			setVertices(points);
//		}
//		else {
////			System.out.println("Encontrada polil�nea sin puntos ...");
//			// TODO: No se debe mandar nunca una polil�nea sin puntos, si esto
//			// ocurre es porque existe un error que hay que corregir ...
//		}
	}