Hi,

I am looking on the algorithm that compute 3d points from control points and parameters of a parametric grid (i.e. the function IjkGridParametricRepresentation::getXyzPointsOfPatchFromParametricPoints if I am right). I do not understand parts of it.

What I understand is: for each layer k, it compute each point at coordinate i,j.

But how do you find the nan nodes ? I do understand the if statement at line 1590.

The “parameters” attribute does not store a parameter between [0,1] on the curve (linear interpolation case) ?

Thanks in advance

Hi Lionel,

Right. I would have said “layer interface” (surface) instead of “layer” (which usually describes a volume) but I guess we mean the same concept.

I am not sure to try to find nan nodes… In my memories, a nan node just correspond to a nan parameter.

Do you mean 1790 on https://github.com/F2I-Consulting/fesapi/blob/master/src/resqml2_0_1/IjkGridParametricRepresentation.cpp (indeed IjkGridParametricRepresentation::getXyzPointsOfPatchFromParametricPoints starts at line 1705 which is superior to 1590)

Do you mean that you do NOT understand the Business rule on line 1791?

No, it is not forced.

FYI, 99% of the exchanged parametric grids are case “pillarInfo.pillarKind[coordLineIndex] == 4” i.e. “Z linear cubic spline” cause of Petrel grids.

I am not sure other cases have really been tested.

Yes I meant “layer surface”.

I was talking about the line 1725 and further, sorry.

The alwyn parametric dataset gives me pillarKind==1. What is the meaning of this parameter if it not the interpolation parameter ?

My mistake. I was totally wrong.

The common 'reservoir" case is more pillarInfo.pillarKind[coordLineIndex] == 1 and controlPointCount == 2

Other cases are also used.

This pillarKind value just tells you that your pillar is straight (or “polystraight”). It does not tell you anything about the node parameters along this pillar.

The “controlPointParameters” gives you the “range(s)” of your node parameters along the pillar.

The “parameters” (which are related to the range(s) described above) allow you to find the XYZ of your nodes based on the XYZ of the control points it fits into (first control point before the node and first control point after the node).

Here you have all the parameters information needed (simple reservoir case of pillarInfo.pillarKind[coordLineIndex] == 1 and controlPointCount == 2)

With the XYZ of your control points (black), you could quite easily find back the XYZ of the nodes (green)

Thanks for all these explanations. I do not understand the right part of the OR of this line (1725):

if (pillarInfo.pillarKind[coordLineIndex] == -1 || parameters[paramIndex] != parameters[paramIndex])

If the pillar is not defined or if the parameter on a defined pillar is not defined (NaN) then I cannot compute XYZ of the parameter

ok! I just understand that this is a trick to test the nan of floating point numbers

Right, isnan method is only supported from C++11 and fesapi currently supports C++03 (which should be given up end of this year)