Integrated mesh modification

This sample shows how to modify an integrated mesh by masking, clipping, or replacing (flattening) regions of the mesh. These modifications can be applied to IntegratedMeshLayer and IntegratedMesh3DTilesLayer. Modifications are applied client-side in the browser and do not modify the underlying data. It's possible to create modifications using the SketchViewModel to draw polygons in the scene and choosing a modification type to apply. The supported modification types are:

IllustrationModificationDescription
modification-type-clip
clip - removes selected areaClip-out portions of the integrated mesh to see features below. For example, utility work on gas or water lines in an area. Planners can create a scene in which the integrated mesh is clipped out at a site to expose the water or gas lines below it.
modification-type-mask
mask - displays only selected areaDefine an area of interest. Use a polygon and draw only parts of the integrated mesh inside that polygon. For example, if you want to show only a portion of an integrated mesh within the boundaries of a city.
modification-type-replace
replace - flattens selected areaReplace an area of an integrated mesh based on a 3D polygon. For example, to add constructed buildings, flatten the integrated mesh at the footprint of a building so the new building can be visualized. Create different scenarios of the new construction area and share the scenarios as a web scene to discuss with stakeholders. The integrated mesh flattens to the minimum z-vertex of the modification polygon.

Here is an example of how to create and add modifications to an IntegratedMeshLayer. The same pattern applies to IntegratedMesh3DTilesLayer.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// create the integrated mesh layer
const layer = new IntegratedMeshLayer({ ... });

// create a polygon
const polygon = new Polygon({ ... });

// create the modifications
let modifications = new SceneModifications(
  [
    new SceneModification({geometry: polygon, type: 'replace'})
  ]);

// add the modification to the integrated mesh
imLayer.modifications = modifications;

Modifications can also be created on the desktop in ArcGIS Pro and then published in a WebScene along with the layer for access from web clients. Read more about it in the ArcGIS Pro documentation page: Modify an integrated mesh layer.

The integrated mesh scene layer used in this sample was generated with nFrames SURE and is used courtesy of Aerowest GmbH.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.