Rajat Sharma
Rajat Sharma

Reputation: 9

Ocean: Creating surface from another surface

I like to create a new Slb.Ocean.Petrel.DomainObject.Shapes.Surface from Slb.Ocean.Petrel.DomainObject.Shapes.Surface by performing calculations on every points on the surface to generate a new surface, any idea how it can be done?

Upvotes: -7

Views: 109

Answers (1)

zlu
zlu

Reputation: 226

I assume you're referring to RegularHeightFieldSurface instead of Surface, which is abstract. You can do something like the following:

var outSurface = parentCollection.CreateRegularHeightFieldSurface("output surface", inputSurface.SpatialLattice);

You can then iterate through all Samples of the inputSurface, compute your output samples, and set outputSurface.Samples to the computed samples.

As an alternative, instead of creating a new surface, you can just create a new SurfaceProperty of the input surface.

Upvotes: 1

Related Questions