public Base generatePaperBase(String type) {
    Base paperBase = new Base(0, 0, type);

    if (type == "bottom") {

      for (int i = 0; i < this.ribNum; i++) {
        int after = i + 1;
        if (i == this.ribNum) {
          after = 0;
        }

        DCHalfEdge outerBottomCircle =
            new DCHalfEdge(
                new CompPoint(xMainTop[rib.bottomNotchPos][i], zMainTop[rib.bottomNotchPos][i]),
                new CompPoint(
                    xMainTop[rib.bottomNotchPos][after], zMainTop[rib.bottomNotchPos][after]));

        paperBase.addHalfEdge(outerBottomCircle);
      }
      double tabWidth = -50;
      paperBase.largeTabs(tabWidth);

      paperBase.generateHole(bottomHoleWidth / 2);
    }
    if (type == "top") {
      for (int i = 0; i < this.ribNum; i++) {
        int after = i + 1;
        if (i == this.ribNum) {
          after = 0;
        }

        DCHalfEdge outerTopCircle =
            new DCHalfEdge(
                new CompPoint(xMainTop[rib.topNotchPos][i], zMainTop[rib.topNotchPos][i]),
                new CompPoint(xMainTop[rib.topNotchPos][after], zMainTop[rib.topNotchPos][after]));

        paperBase.addHalfEdge(outerTopCircle);
      }
      double tabWidth = -50;
      paperBase.largeTabs(tabWidth);

      paperBase.generateHole(topHoleWidth / 2);
    }

    return paperBase;
  }
  private void generateBases(int sides) {

    for (int i = 0; i < sides + 1; i++) {
      int after = i + 1;
      if (i == sides) {
        after = 0;
      }
      DCHalfEdge outerBottomCircle = null;
      try {
        outerBottomCircle =
            new DCHalfEdge(
                new CompPoint(xMainTop[rib.bottomNotchPos][i], zMainTop[rib.bottomNotchPos][i]),
                new CompPoint(
                    xMainTop[rib.bottomNotchPos][after], zMainTop[rib.bottomNotchPos][after]));
        // DCHalfEdge innerBottomCircle = new DCHalfEdge(new CompPoint(xMainTop[bottomCutoff-5][i],
        // zMainTop[bottomCutoff-5][i]), new CompPoint(xMainTop[bottomCutoff-5][after],
        // zMainTop[bottomCutoff-5][after]));
      } catch (NullPointerException e) {
        System.out.println("error=" + e);
      }
      DCHalfEdge outerTopCircle =
          new DCHalfEdge(
              new CompPoint(xMainTop[rib.topNotchPos][i], zMainTop[rib.topNotchPos][i]),
              new CompPoint(xMainTop[rib.topNotchPos][after], zMainTop[rib.topNotchPos][after]));
      // DCHalfEdge innerTopCircle = new DCHalfEdge(new CompPoint(xMainTop[topCutoff-5][i],
      // zMainTop[topCutoff-5][i]),new CompPoint(xMainTop[topCutoff-5][after],
      // zMainTop[topCutoff-5][after]));

      bottomBase.addHalfEdge(outerBottomCircle);
      // bottomBase.addHalfEdge(innerBottomCircle);

      topBase.addHalfEdge(outerTopCircle);
      // topBase.addHalfEdge(innerTopCircle);

    }
  }