02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Geometry<br />

Arrays – This property returns an IGeometryArrays that provides access to arrays<br />

defining the LatticeInfo object corner and annotation values.<br />

//Get the size arrays<br />

int [ ] sizes = lattice.Arrays.GetSizeArray();<br />

Corners – This property returns an IGeometryCorners that provides access to the<br />

geometry information for the four lattice corners.<br />

//Get the X location for corner 2<br />

double cornerX = lattice.Corners.WorldX(2);<br />

Operations - Convenience functions to convert between world, index, and annotation<br />

values as well as rotating the geometry. The property returns an<br />

IGeometryOperations from which the conversions may be done.<br />

double[ ] x = {100000.0, 100010.0, 100020.0};<br />

double[ ] y = {200000.0, 200020.0, 200040.0};<br />

//Convert X and Y arrays in place to indexes.<br />

lattice.Operations.WorldToIndex(x, y);<br />

Single – This property returns an IGeometrySingle that allows individual<br />

LatticeInfo geometry information (origin, spacing, rotation) to be read.<br />

//Get the LatticeInfo object I axis rotation.<br />

double rotationI = lattice.Single.RotationI;<br />

UnitCorners – This property returns an IGeometryUnitCorners that allows viewing<br />

of geometry information in three points. The points represent the origin and the corners at<br />

the end of the unit vectors along the I and J axis (1, 0) and (0, 1).<br />

//Returns the X positions at the three corners<br />

double[ ] x = lattice.UnitCorners.GetWorldUnitX();<br />

LatticeInfo provides the following public methods:<br />

Equals – This method compares two instances of LatticeInfo objects. A certain<br />

amount of leeway is provided when the comparison is done, which amounts to 1/10 of the<br />

4-172 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!