/// <summary> /// /// </summary> private void ComputeGeometry() { BufferOriginalPrecision(); if (resultGeometry != null) { return; } // try and compute with decreasing precision for (int precDigits = MaxPrecisionDigits; precDigits >= 0; precDigits--) { try { BufferFixedPrecision(precDigits); } catch (TopologyException ex) { saveException = ex; // don't propagate the exception - it will be detected by fact that resultGeometry is null } if (resultGeometry != null) { return; } } // tried everything - have to bail throw saveException; }
/// <summary> /// /// </summary> private void BufferOriginalPrecision() { try { BufferBuilder bufBuilder = new BufferBuilder(); bufBuilder.QuadrantSegments = quadrantSegments; bufBuilder.EndCapStyle = endCapStyle; resultGeometry = bufBuilder.Buffer(argGeom, distance); } catch (TopologyException ex) { saveException = ex; // don't propagate the exception - it will be detected by fact that resultGeometry is null } }
/// <summary> /// /// </summary> private void BufferOriginalPrecision() { try { BufferBuilder bufBuilder = new BufferBuilder(); bufBuilder.QuadrantSegments = _quadrantSegments; bufBuilder.EndCapStyle = _endCapStyle; _resultGeometry = bufBuilder.Buffer(_argGeom, _distance); } catch (TopologyException ex) { _saveException = ex; // don't propagate the exception - it will be detected by fact that resultGeometry is null } }
/// <summary> /// /// </summary> private void ComputeGeometry() { BufferOriginalPrecision(); if (_resultGeometry != null) return; // try and compute with decreasing precision for (int precDigits = MAX_PRECISION_DIGITS; precDigits >= 0; precDigits--) { try { BufferFixedPrecision(precDigits); } catch (TopologyException ex) { _saveException = ex; // don't propagate the exception - it will be detected by fact that resultGeometry is null } if (_resultGeometry != null) return; } // tried everything - have to bail throw _saveException; }