# Ellipse outline clipped by terrain/mesh

**URL:** <https://community.cesium.com/t/ellipse-outline-clipped-by-terrain-mesh/15092>\
**Category:** CesiumJS\
**Created:** [September 1, 2021, 6:46am UTC](https://community.cesium.com/t/ellipse-outline-clipped-by-terrain-mesh/15092 "2021-09-01T06:46:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwakuya](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/iwakuya/32/5074_2.png) [@iwakuya](https://community.cesium.com/u/iwakuya)\
**Post date:** [September 1, 2021, 6:46am UTC](https://community.cesium.com/t/ellipse-outline-clipped-by-terrain-mesh/15092/1 "2021-09-01T06:46:22Z")

</div>

Hello. I have a question regarding ellipse outline behavior.

I simply wanted to draw an ellipse with an outline. I set the height to 1 because I wanted them to be at least at the same level as the ground.

Here’s the [sandcastle link](https://sandcastle.cesium.com/#c=hVNdb9owFP0rFk9BypwEQkIordZRxh5oqRhdHxpUpcmleHPsyHZgdOp/n/NFoUWblIf4+p57zzn3ehMJtCGwBYHOEYMtGoEkeYp/lDEjbMXlecSZiggDEbZM9CdkCCkQQkduBd+QBMSgAcYCIgX3XNBkUaUYbTNkr+2zkIUs5kwqFANTZcOHT34P9wK/53iO3el7Qc8zXRvb3b4fuEG/49iOEyzPGlzG6Y5qFvIA6ri+69v9Tqfj1lDP9lw3cDzbN1FT33Nc1/N6nt+tk/o91yu+TuC6y0NqRMQUdP3KFKyZEkVA4ihJjFJ4xqWOcLZXPIqE0n8R6+KV4OkVPAsAaVQiH+ylWet9cJaFEwixKIUBClsTnceajpFCayDPa4W2RK0Rz1WhVNtdIIBSkkkNKhkgJCEl14RxcfmbyAFytCTz4Cb6eeIm1WMRJKJvvDnlAk/m4/FNnVIR0Kj6XJMYICVyMJFlNRTTXFv1BLqbQisumkSkOEqIzGi0OypwTxK1HqDuUZs5rEAAi2FP6NtxHI+ml9e3j4vZ42Q+u7u5KtGvb7v0jwlVa7K3qxmZ/M/MLvW+7oz9lrVrvtuKvvPRyYMHU7p5Xd/oV5GBUDvjyOrRbH7zdTq7H8+/TO/GTfWYRmm24BPBc5bUVp9W+sJ5uuDGO93ts5bZGkq1o3BRVUToM0kzLhTKBTUwthSkeiZasPWUx79A4VjKonKROrQOocOEbBBJzk+8+4KolPpmlVP6nbzo3bwYWjr/A5TyKCHsebYBUWyCTls7F9MqiDEeWvp4Gqk4p0+ReFf5Lw) to demonstrate them.

As the sandcastle shows, to show the outline I have to set the height. However, the outline looks clipped by the terrain in certain zoom level. Here’s one example:

![Peek 2021-09-01 15-43](https://global.discourse-cdn.com/cesium/original/2X/5/5845f2d7f19c60c9fa4412c4d0e6aa96fc82ebb5.gif)

If I didn’t want them to clip, seems like the only option I could do is to not use an outline. In the sandcastle I also showed a polyline which doesn’t seem to behave that way.

Note that I tested this on our own 3D tileset and the clipping also happens, so I don’t think it’s a tileset issue.

My question is, is there any other way I could show the entire circle with the outline, without it being clipped? I tried the `zIndex` approach and it doesn’t work. Or is there a way to make the behavior similar to the polyline perhaps. Or, if the outline could “drape” all over the terrain instead.

Thank you.

---

<div class="post-metadata">

**Author:** ![sam.rothstein](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sam.rothstein/32/6584_2.png) [@sam.rothstein](https://community.cesium.com/u/sam.rothstein)\
**Post date:** [September 1, 2021, 8:03pm UTC](https://community.cesium.com/t/ellipse-outline-clipped-by-terrain-mesh/15092/2 "2021-09-01T20:03:33Z")

</div>

@iwakuya

Thank you for sharing some preliminary details on your application. I was able to reproduce the issue on my machine - the circle clearly seems to be cut off by the 3D Tileset. My first suggestion would be the `zIndex` approach. However, it seems like you have already tried this. Can you share some more details about your implementation of this approach? It is possible that you missed something.

CesiumJS does support draping polygons over terrain. The classification sandcastle demo shows how this can be accomplished.

> **[Cesium Sandcastle](https://sandcastle.cesium.com/?src=Classification.html)**
>
> The Cesium Sandcastle provides an interactive environment for testing Cesium code.

As seen here, we can drape a red highlight box over a 3D Tileset.

 ![image](https://global.discourse-cdn.com/cesium/original/2X/0/034904c8fb21c01be324af826b60606ebed13e4f.jpeg)

Let me know if you have any more questions or concerns. I am looking forward to learning more about your application!

-Sam
