Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WallGeometry bug #1483

Merged
merged 2 commits into from
Feb 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Beta Releases
* `BingMapsImageryProvider` now uses HTTPS by default for metadata and tiles when the document is loaded over HTTPS.
* `RequestErrorEvent` now includes the headers that were returned with the error response.
* Added `CesiumInspector` widget for graphics debugging. In Cesium Viewer, it is enabled by using the query parameter `inspector=true`.
* 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)

### b25 - 2014-02-03

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/WallGeometryLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ define([
}

function latLonEquals(c0, c1) {
return ((CesiumMath.equalsEpsilon(c0.latitude, c1.latitude, CesiumMath.EPSILON6)) && (CesiumMath.equalsEpsilon(c0.longitude, c1.longitude, CesiumMath.EPSILON6)));
return ((CesiumMath.equalsEpsilon(c0.latitude, c1.latitude, CesiumMath.EPSILON14)) && (CesiumMath.equalsEpsilon(c0.longitude, c1.longitude, CesiumMath.EPSILON14)));
}

var scratchCartographic1 = new Cartographic();
Expand Down
11 changes: 11 additions & 0 deletions Specs/Core/WallGeometrySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ defineSuite([
}).toThrowDeveloperError();
});

it('does not throw when positions are unique but close', function() {
expect(function() {
return WallGeometry.createGeometry(new WallGeometry({
vertexFormat : VertexFormat.POSITION_ONLY,
positions : ellipsoid.cartographicArrayToCartesianArray([
Cartographic.fromDegrees(-47.93121266896352,-15.771192496304398),
Cartographic.fromDegrees(-47.93119792786269,-15.771148001875085)])
}));
}).not.toThrowDeveloperError();
});

it('creates positions relative to ellipsoid', function() {
var coords = [
Cartographic.fromDegrees(49.0, 18.0, 1000.0),
Expand Down