# Generating 3D geometry object with different base and top geometry

**URL:** <https://community.cesium.com/t/generating-3d-geometry-object-with-different-base-and-top-geometry/10910>\
**Category:** CesiumJS\
**Created:** [September 13, 2020, 1:01pm UTC](https://community.cesium.com/t/generating-3d-geometry-object-with-different-base-and-top-geometry/10910 "2020-09-13T13:01:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nojakrikas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/nojakrikas/32/3204_2.png) [@nojakrikas](https://community.cesium.com/u/nojakrikas)\
**Post date:** [September 13, 2020, 1:01pm UTC](https://community.cesium.com/t/generating-3d-geometry-object-with-different-base-and-top-geometry/10910/1 "2020-09-13T13:01:25Z")

</div>

Hi there,

in my Cesium project i want to create object with different top and base geometry? Or different geometry in every level. I have always same number of points in level. Now i must create polygon from points and give him height, but there are many polygons and doesnt look it good.

example - 1. actual, 2. and 3. is what i looking for

 ![example](https://global.discourse-cdn.com/cesium/original/2X/d/d8cb88dc81aeaf8e5237c39f7cebd0fa9593b0fe.png)

Thanks you for your reply.

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [September 14, 2020, 8:54pm UTC](https://community.cesium.com/t/generating-3d-geometry-object-with-different-base-and-top-geometry/10910/2 "2020-09-14T20:54:37Z")

</div>

How are you currently creating it? Can you share a code example or Sandcastle (see [How to share custom Sandcastle examples](https://community.cesium.com/t/how-to-share-custom-sandcastle-examples/9828)) ?

You may need to create custom geometry with the primitive API, or generate this geometry outside of CesiumJS and load it as a glTF.

---

<div class="post-metadata">

**Author:** ![nojakrikas](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/nojakrikas/32/3204_2.png) [@nojakrikas](https://community.cesium.com/u/nojakrikas)\
**Post date:** [September 15, 2020, 6:37am UTC](https://community.cesium.com/t/generating-3d-geometry-object-with-different-base-and-top-geometry/10910/3 "2020-09-15T06:37:02Z")

</div>

Hi,  
there is sandcastle [sandcastle geometry example](https://sandcastle.cesium.com/index.html#c=hVXbbttGEP0VQi+RamE1e991FCOFW8AFAjRoi+Yh8gMjrSUiFCmQlFLF8L/38BaLbFJTD+LunJk5c3Z2eIqL6JSEL6GI3kRZ+BLdhjI57tnfzd701bpZ3uZZFSdZKF7NXq+yE3xCViVVEkp4te6s3wGghRzy9LzNsxrycZVFeLq/+uGSec/JOWcsd1bPI+UZEXdKem69dVrOL9C6sUlOWpkGrQk7SpDTXGuvjbhEW9iMk9rLF6GuDkzeGSkcFy/RqANzqYS1UjWxlUUZSGQdQljp7Ji0lUKJrsA6lzJCk+BcSk+qxd7PB8LAyykharamI+SsQSkO0YQWgxSGeaGUdMqaZzSyaaOlQWanhvSt1Q5cqcU6kFcG9KGVVDSOTEIZ7QRJ3qE5WSU5d045ktaManXeCm6sxwEp71oHDm1RKKeazyVeMe69E2iBuswe7+EqLA6PkOX78iimiXv9jZN3kNN4HBSyejXkxK01XEjqmgbiGG/IcMc9R95RwU5AN65Ff7aeWU4CmjuBxjN+KKXmQpCtxUFeb17oHMOsF4aElo34pBryCC6EVpqjMaQaCSpIk3V9nRK6ILIkI5W1P+gcg+jSodN9XwFXeDX4oU0EmSElhYNRRLLvB8ChPK4YNEAYPkRrJ53pxFR9wRDLcPSQ4IqLUXRUe9FsAHOBNsBV8xp3YP6/zHGw5AgrSKsJ+0M4egZXaBAc+tTSKDSVlJ0+q+y+GUcPeRFN65mUYBjRa/wtv40nloZsW+2weXU1e2wd+1nG4s1m+vicufOJrqOLzfrZJaGIi/XuDNPFFH3f4u9667Tbv42LCm9xJtlDke9/CdsihPLnoojP057Xx+R+NpuP0oRku6uuMdKIop+iZGQO/1TFcRM2dw0MVNBXLTC6anxG+PxYpZjqAMIvfN94m6cQ77qvqFmyD3e//fXrCH8Ixfu8hGyot8//47Afkk21A0KNzPu4CkUSp+OMtUx/xNkm308f4/Swi+vqGD3Nnt2f2ten+hP1VJ/6ZD5ZltU5DTet5W2yP+RFFR2LdMrYogr7Q4p05eLTcf05VGxdlrXvctE7LTfJKUo2b1aT0WdwNYnWaVyWsDwc0/TP5GtYTW6WC+AHbmkeb5Js+/spFGl8riE7fvOu3WSMLRdY/teryvP0U1xcRPwX)
