コード例 #1
0
  protected void processMouthpiece(SortedPositionList<BorePoint> borePointList) {
    double mouthpiecePosition = mouthpiece.getBorePosition();

    // Make the bore sections above mouthpiece
    makeSections(borePointList, mouthpiecePosition);

    // Make bore section that ends with mouthpiece
    // Set mouthpiece boreDiameter
    processPosition(borePointList, mouthpiece);

    List<BoreSection> headspace = new ArrayList<BoreSection>();
    for (Iterator<ComponentInterface> it = components.iterator(); it.hasNext(); ) {
      ComponentInterface component = it.next();
      if (component instanceof BoreSection) {
        BoreSection section = (BoreSection) component;
        if (section.getRightBorePosition() <= mouthpiecePosition) {
          headspace.add((BoreSection) component);
          it.remove();
        }
      }
    }

    mouthpiece.setHeadspace(headspace);

    // Move the first borepoint to top of TSH
    //		BorePoint firstPoint = borePointList.getFirst();
    //		double newPosition = firstPoint.getBorePosition() -
    // mouthpiece.getFipple().getWindowLength();
    //		firstPoint.setBorePosition(newPosition);
  }
コード例 #2
0
  protected void convertDimensions(double multiplier) {
    if (mouthpiece != null) {
      mouthpiece.convertDimensions(multiplier);
    }

    if (borePoint != null) {
      for (BorePoint aPoint : borePoint) {
        aPoint.convertDimensions(multiplier);
      }
    }

    if (hole != null) {
      for (Hole aHole : hole) {
        aHole.convertDimensions(multiplier);
      }
    }

    if (termination != null) {
      termination.convertDimensions(multiplier);
    }
  }