code: public static double getLength2D(IBond bond) {
          if (bond.getBegin() == null || bond.getEnd() == null) {
              return 0.0;
          }
          Point2d point1 = bond.getBegin().getPoint2d();
          Point2d point2 = bond.getEnd().getPoint2d();
          if (point1 == null || point2 == null) {
              return 0.0;
          }
          return point1.distance(point2);
      }
docs: Returns the geometric length of this bond in 2D space.
  See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets
  
  @param  bond  Description of the Parameter
  @return       The geometric length of this bond