OffsetSegmentGenerator constructor

OffsetSegmentGenerator(
  1. PrecisionModel precisionModel,
  2. BufferParameters bufParams,
  3. double distance
)

Implementation

OffsetSegmentGenerator(this.precisionModel, this.bufParams, double distance) {
  // compute intersections in full precision, to provide accuracy
  // the points are rounded as they are inserted into the curve line
  li = new RobustLineIntersector();
  filletAngleQuantum = math.pi / 2.0 / bufParams.getQuadrantSegments();

  /**
   * Non-round joins cause issues with short closing segments, so don't use
   * them. In any case, non-round joins only really make sense for relatively
   * small buffer distances.
   */
  if (bufParams.getQuadrantSegments() >= 8 &&
      bufParams.getJoinStyle() == BufferParameters.JOIN_ROUND)
    closingSegLengthFactor = MAX_CLOSING_SEG_LEN_FACTOR;
  init(distance);
}