How to clipping multiple Polygon on the Cesium3DTileset?

103 views
Skip to first unread message

itsegg

unread,
Mar 22, 2020, 9:55:14 PM3/22/20
to cesium-dev
1. A concise explanation of the problem you're experiencing.
I want to clipping multiple Polygon on Cesium3DTileset, but now I can only clipping one.


2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: tiles.url,
clippingPlanes: [
new Cesium.ClippingPlaneCollection({ // clipping one Polygon
planes: [
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 1.0, 0.0), 1.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, -1.0, 0.0), -1.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), 1.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), -1.0)
],
unionClippingRegions: false,
}),
new Cesium.ClippingPlaneCollection({ // clipping two Polygon
planes: [
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 1.0, 0.0), 2.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, -1.0, 0.0), -2.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), 2.0),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), -2.0)
],
unionClippingRegions: false,
})
]
}));


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to clip multiple polygons in Cesium3DTileset,Used to display the pipeline model below.

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


Omar Shehata

unread,
Mar 23, 2020, 9:30:25 PM3/23/20
to cesium-dev
Can you tell me a bit more about your use case? or share an image/video of what you're trying to accomplish?

5680...@qq.com

unread,
Mar 23, 2020, 10:51:18 PM3/23/20
to cesium-dev

20200324102717.png



Frank Chan

unread,
Apr 8, 2020, 11:41:47 PM4/8/20
to cesium-dev


Hi, Omar
   I beleive that  itsegg want to clip multiple holes on the Cesium3DTileset or Globe with the clippingPlanes. For example, draw one polygon on Union Square Park and another one on Washington Square Park, and then clip holes with that two polygons on the surface of the  Cesium3DTileset or Globe. Is it possible to be implemented by Cesium?
dighole.png

5680...@qq.com

unread,
Apr 9, 2020, 4:05:15 AM4/9/20
to cesium-dev
Cesium can only cut one polygon, I have not realized that cutting multiple polygons

在 2020年4月9日星期四 UTC+8上午11:41:47,Frank Chan写道:

Omar Shehata

unread,
May 4, 2020, 2:37:57 PM5/4/20
to cesium-dev
Heads up that the forum has transitioned over to Discourse and this Google Group will be put into read-only mode today. Details about the transition here.

Reply all
Reply to author
Forward
0 new messages