{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Working With 2D Triangle Mesh Layers","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"working-with-2d-triangle-mesh-layers","__idx":0},"children":["Working With 2D Triangle Mesh Layers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]},": you will need to include GocadData and Gocad2D in your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Dependencies"]}," list in addition to Viewer2D."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-a-triangle-mesh-2d-layer-for-a-xsection-window","__idx":1},"children":["Creating a triangle mesh 2D layer for a XSection window"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Triangle mesh layers can only be added to a XSection window if that window already contains a seismic layer. In this example, we assume you have already created a triangle mesh dataset triangleMeshData and a XSection window xsectionWindow."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"NamedProps layerProperties = new NamedProps();\nlayerProperties.putProperty(ITriangleMeshLayer.LINE_COLOR, Color.Red);\nITriangleMeshLayer layer = ITriangleMeshLayer.factory.createLayer(xsectionWindow, triangleMeshData, layerProperties, false);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"creating-a-triangle-mesh-2d-layer-for-a-map-window","__idx":2},"children":["Creating a triangle mesh 2D layer for a Map window"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Triangle mesh layers can only be added to a Map window if that window already contains a seismic layer. In this example, we assume you have already created a triangle mesh dataset triangleMeshData and a Map window mapWindow."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"NamedProps layerProperties = new NamedProps();\nlayerProperties.putProperty(IMapPointsetLayer.LINE_COLOR, Color.Red);\nIMapTriangleMeshLayer layer = IMapTriangleMeshLayer.factory.createLayer(mapWindow, triangleMeshData, layerProperties, false);\n"},"children":[]}]},"headings":[{"value":"Working With 2D Triangle Mesh Layers","id":"working-with-2d-triangle-mesh-layers","depth":1},{"value":"Creating a triangle mesh 2D layer for a XSection window","id":"creating-a-triangle-mesh-2d-layer-for-a-xsection-window","depth":3},{"value":"Creating a triangle mesh 2D layer for a Map window","id":"creating-a-triangle-mesh-2d-layer-for-a-map-window","depth":3}],"frontmatter":{"title":"Working With 2D Triangle Mesh Layers","pageId":"intviewer-api-for-layers/working-with-2d-triangle-mesh-layers","seo":{"title":"Working With 2D Triangle Mesh Layers"}},"lastModified":"2026-10-22T14:32:05.573Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-api-for-layers/working-with-2d-triangle-mesh-layers","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}