How to add a outline to WallGeometry

1. A concise explanation of the problem you're experiencing.
The wall drawn through WallGeometry has no outline,The wall drawn through WallOutlineGeometry has no surface.How to add a outline to WallGeometry.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

        var AODLocs = ;
        AODLocs.push(115.33);
        AODLocs.push(39.33);
        AODLocs.push(115.55);
        AODLocs.push(39.55);
        AODLocs.push(115.66);
        AODLocs.push(39.55);
        AODLocs.push(115.88);
        AODLocs.push(39.55);
        AODLocs.push(115.83);
        AODLocs.push(39.55);
        AODLocs.push(115.92);
        AODLocs.push(39.55);
        AODLocs.push(115.96);
        AODLocs.push(39.55);
        AODLocs.push(116.22);
        AODLocs.push(39.55);
        AODLocs.push(116.66);
        AODLocs.push(39.57);
        AODLocs.push(116.88);
        AODLocs.push(39.59);
        AODLocs.push(116.99);
        AODLocs.push(39.62);
        AODLocs.push(117.11);
        AODLocs.push(39.66);
        AODLocs.push(117.33);
        AODLocs.push(39.66);
        var instances = ;
        for (var i = 0; i < AODLocs.length - 2; i = i + 2) {
            instances.push(new Cesium.GeometryInstance({
                geometry: new Cesium.WallGeometry({
                    positions: Cesium.Cartesian3.fromDegreesArrayHeights([
                        AODLocs[i], AODLocs[i + 1], 50000,
                        AODLocs[i + 2], AODLocs[i + 3], 50000
                    ]),
                    outline: true,
                    outlineColor: Cesium.Color.RED,
                    outlineWidth: 10,
                    vertexFormat: Cesium.VertexFormat.POSITION_AND_COLOR,
                }),
                attributes: {
                    color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromRandom().withAlpha(0.6)),
                    outlineColor: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED),
                    outline: new Cesium.GeometryInstanceAttribute({
                        componentDatatype: Cesium.ComponentDatatype.UNSIGNED_BYTE,
                        componentsPerAttribute: 1,
                        normalize: true,
                        value: [1.0]
                    }),
                }
            }));
        }
        viewer.scene.primitives.add(new Cesium.Primitive({
            geometryInstances: instances,
            appearance: new Cesium.PerInstanceColorAppearance({
                flat: true,
                translucent: true
            })
        }));

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you're using, your operating system and browser.

HI there,

Check how you are iterating through your positions. Here’s an example of wall geometries with entities, but how the positions are added is the same as with primitives.

Thanks,

Gabby

在 2018年4月27日星期五 UTC+8下午9:46:23,Gabby Getz写道:

HI there,

Check how you are iterating through your positions. Here's an example of wall geometries with entities, but how the positions are added is the same as with primitives.

Thanks,
Gabby

On Thursday, April 26, 2018 at 1:31:42 AM UTC-4, think.h...@gmail.com wrote:1. A concise explanation of the problem you're experiencing.
The wall drawn through WallGeometry has no outline,The wall drawn through WallOutlineGeometry has no surface.How to add a outline to WallGeometry.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var AODLocs = ;
AODLocs.push(115.33);
AODLocs.push(39.33);
AODLocs.push(115.55);
AODLocs.push(39.55);
AODLocs.push(115.66);
AODLocs.push(39.55);
AODLocs.push(115.88);
AODLocs.push(39.55);
AODLocs.push(115.83);
AODLocs.push(39.55);
AODLocs.push(115.92);
AODLocs.push(39.55);
AODLocs.push(115.96);
AODLocs.push(39.55);
AODLocs.push(116.22);
AODLocs.push(39.55);
AODLocs.push(116.66);
AODLocs.push(39.57);
AODLocs.push(116.88);
AODLocs.push(39.59);
AODLocs.push(116.99);
AODLocs.push(39.62);
AODLocs.push(117.11);
AODLocs.push(39.66);
AODLocs.push(117.33);
AODLocs.push(39.66);
var instances = ;
for (var i = 0; i < AODLocs.length - 2; i = i + 2) {
instances.push(new Cesium.GeometryInstance({
geometry: new Cesium.WallGeometry({
positions: Cesium.Cartesian3.fromDegreesArrayHeights([
AODLocs[i], AODLocs[i + 1], 50000,
AODLocs[i + 2], AODLocs[i + 3], 50000
]),
outline: true,
outlineColor: Cesium.Color.RED,
outlineWidth: 10,
vertexFormat: Cesium.VertexFormat.POSITION_AND_COLOR,
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromRandom().withAlpha(0.6)),
outlineColor: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED),
outline: new Cesium.GeometryInstanceAttribute({
componentDatatype: Cesium.ComponentDatatype.UNSIGNED_BYTE,
componentsPerAttribute: 1,
normalize: true,
value: [1.0]
}),
}
}));
}
viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: instances,
appearance: new Cesium.PerInstanceColorAppearance({
flat: true,
translucent: true
})
}));

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you're using, your operating system and browser.

Thank you for your reply,But I don't understand your reply very much。WallGraphics provides the outline attribute to draw outline. But WallGeometry does not offer. WallGeometry can not display outline by adding outline attribute.Is it impossible for WallGeometry to display outline

The important part is how you set the positions:

positions : Cesium.Cartesian3.fromDegreesArrayHeights([-107.0, 43.0, 100000.0,

-97.0, 43.0, 100000.0,

-97.0, 40.0, 100000.0,

-107.0, 40.0, 100000.0,

-107.0, 43.0, 100000.0]),

``

I think that’s the origin of your error.