Skip to content

Commit 3f6637b

Browse files
committed
Merge pull request #1483 from AnalyticalGraphicsInc/wallGeometry
Fix WallGeometry bug
2 parents 1a49160 + 2d695e6 commit 3f6637b

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Beta Releases
4949
* `BingMapsImageryProvider` now uses HTTPS by default for metadata and tiles when the document is loaded over HTTPS.
5050
* `RequestErrorEvent` now includes the headers that were returned with the error response.
5151
* Added `CesiumInspector` widget for graphics debugging. In Cesium Viewer, it is enabled by using the query parameter `inspector=true`.
52+
* Fixed `WallGeometry` bug that failed by removing positions that were less close together by less than 6 decimal places. [#1483](https://github.com/AnalyticalGraphicsInc/cesium/pull/1483)
5253

5354
### b25 - 2014-02-03
5455

Source/Core/WallGeometryLibrary.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ define([
5151
}
5252

5353
function latLonEquals(c0, c1) {
54-
return ((CesiumMath.equalsEpsilon(c0.latitude, c1.latitude, CesiumMath.EPSILON6)) && (CesiumMath.equalsEpsilon(c0.longitude, c1.longitude, CesiumMath.EPSILON6)));
54+
return ((CesiumMath.equalsEpsilon(c0.latitude, c1.latitude, CesiumMath.EPSILON14)) && (CesiumMath.equalsEpsilon(c0.longitude, c1.longitude, CesiumMath.EPSILON14)));
5555
}
5656

5757
var scratchCartographic1 = new Cartographic();

Specs/Core/WallGeometrySpec.js

+11
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ defineSuite([
6363
}).toThrowDeveloperError();
6464
});
6565

66+
it('does not throw when positions are unique but close', function() {
67+
expect(function() {
68+
return WallGeometry.createGeometry(new WallGeometry({
69+
vertexFormat : VertexFormat.POSITION_ONLY,
70+
positions : ellipsoid.cartographicArrayToCartesianArray([
71+
Cartographic.fromDegrees(-47.93121266896352,-15.771192496304398),
72+
Cartographic.fromDegrees(-47.93119792786269,-15.771148001875085)])
73+
}));
74+
}).not.toThrowDeveloperError();
75+
});
76+
6677
it('creates positions relative to ellipsoid', function() {
6778
var coords = [
6879
Cartographic.fromDegrees(49.0, 18.0, 1000.0),

0 commit comments

Comments
 (0)