Pointwise Plugin SDK
Functions
Structured Grid Import Functions
+ Collaboration diagram for Structured Grid Import Functions:

Functions

PWGM_HCONNECTOR PwModCreateCon (PWGM_HGRIDMODEL model, PWP_UINT size)
 Creates a connector in a model. More...
 
PWGM_HBLOCK PwModCreateStrBlock (PWGM_HGRIDMODEL model, const PWGM_STR_SIZE blkSize)
 Creates a structured block in a model. More...
 
PWGM_HDOMAIN PwModCreateStrDomain (PWGM_HGRIDMODEL model, const PWGM_STR_SIZE domSize)
 Creates a structured domain in a model. More...
 

Detailed Description

These functions are used to import structured grids.

See also

Function Documentation

◆ PwModCreateCon()

PWGM_HCONNECTOR PwModCreateCon ( PWGM_HGRIDMODEL  model,
PWP_UINT  size 
)

Creates a connector in a model.

Parameters
modelThe grid model handle.
sizeSpecifies the number of points in the connector.
Returns
A connector handle.
See also
PwModCreateStrBlock(), PwModCreateStrDomain()
Sample usage:

These snippets are from the GrdpTEST sample plugin included with the Plugin SDK.

The doCreateCon() function creates a connector and loads its vertices:

static void
doCreateCon(const GRDP_RTITEM &rti)
{
// Create a 5 point connector
PwConSetName(hCon, "MyConnector-1");
PwVlstSetXYZ(hVL, 0, 0.0, 0.0, 1.5);
PwVlstSetXYZ(hVL, 1, 1.0, 0.0, 1.5);
PwVlstSetXYZ(hVL, 2, 1.0, 1.0, 1.5);
PwVlstSetXYZ(hVL, 3, 0.0, 1.0, 1.5);
PwVlstSetXYZ(hVL, 4, 0.0, 1.0, 2.5);
}
}

Definition at line 772 of file apiGridModel.cxx.

◆ PwModCreateStrBlock()

PWGM_HBLOCK PwModCreateStrBlock ( PWGM_HGRIDMODEL  model,
const PWGM_STR_SIZE  blkSize 
)

Creates a structured block in a model.

Parameters
modelThe grid model handle.
blkSizeSpecifies the ijk size of the structured block. The number of points is computed as (i * j * k).
Returns
A block handle.
See also
PwModCreateCon(), PwModCreateStrDomain()
Sample usage:

These snippets are from the GrdpTEST sample plugin included with the Plugin SDK.

The doCreateStrBlk() function creates a structured block and loads its vertices:

static void
doCreateStrBlk(const GRDP_RTITEM &rti)
{
const PWGM_STR_SIZE szBlk = { 2, 3, 3 }; // i j k
PWGM_HBLOCK hSBlk = PwModCreateStrBlock(rti.model, szBlk);
PwBlkSetName(hSBlk, "MyStrBlock-1");
// k=0 vertices
PwVlstSetXYZ3(hVL, n3(0, 0, 0), 0.0, 0.0, 0.0);
PwVlstSetXYZ3(hVL, n3(0, 1, 0), 0.0, 1.0, 0.0);
PwVlstSetXYZ3(hVL, n3(0, 2, 0), 0.0, 2.0, 0.0);
PwVlstSetXYZ3(hVL, n3(1, 0, 0), 1.0, 0.0, 0.0);
PwVlstSetXYZ3(hVL, n3(1, 1, 0), 1.0, 1.0, 0.0);
PwVlstSetXYZ3(hVL, n3(1, 2, 0), 1.0, 2.0, 0.0);
// k=1 vertices
PwVlstSetXYZ3(hVL, n3(0, 0, 1), 0.0, 0.0, 0.5);
PwVlstSetXYZ3(hVL, n3(0, 1, 1), 0.0, 1.0, 0.5);
PwVlstSetXYZ3(hVL, n3(0, 2, 1), 0.0, 2.0, 0.5);
PwVlstSetXYZ3(hVL, n3(1, 0, 1), 1.0, 0.0, 0.5);
PwVlstSetXYZ3(hVL, n3(1, 1, 1), 1.0, 1.0, 0.5);
PwVlstSetXYZ3(hVL, n3(1, 2, 1), 1.0, 2.0, 0.5);
// k=2 vertices
PwVlstSetXYZ3(hVL, n3(0, 0, 2), 0.0, 0.0, 1.0);
PwVlstSetXYZ3(hVL, n3(0, 1, 2), 0.0, 1.0, 1.0);
PwVlstSetXYZ3(hVL, n3(0, 2, 2), 0.0, 2.0, 1.0);
PwVlstSetXYZ3(hVL, n3(1, 0, 2), 1.0, 0.0, 1.0);
PwVlstSetXYZ3(hVL, n3(1, 1, 2), 1.0, 1.0, 1.0);
PwVlstSetXYZ3(hVL, n3(1, 2, 2), 1.0, 2.0, 1.0);
}
}

The doCreateStrBlk() helper functions:

inline static const PWGM_INDEX3 &
n3(const PWP_INT32 i, const PWP_INT32 j, const PWP_INT32 k)
{
static PWGM_INDEX3 ret;
ret.i = i;
ret.j = j;
ret.k = k;
return ret;
}

Definition at line 1358 of file apiGridModel.cxx.

◆ PwModCreateStrDomain()

PWGM_HDOMAIN PwModCreateStrDomain ( PWGM_HGRIDMODEL  model,
const PWGM_STR_SIZE  domSize 
)

Creates a structured domain in a model.

Parameters
modelThe grid model handle.
domSizeSpecifies the ij size of the structured domain. The value of k is ignored. The number of points is computed as (i * j).
Returns
A domain handle.
See also
PwModCreateCon(), PwModCreateStrBlock()
Sample usage:

These snippets are from the GrdpTEST sample plugin included with the Plugin SDK.

The doCreateStrDom() function creates a structured domain and loads its vertices:

static void
doCreateStrDom(const GRDP_RTITEM &rti)
{
const PWGM_STR_SIZE szBlk = { 2, 3 }; // i j (k ignored)
PwDomSetName(hSDom, "MyStrDomain-1");
PwVlstSetXYZ2(hVL, n2(0, 0), 0.0, 0.0, 0.0);
PwVlstSetXYZ2(hVL, n2(0, 1), 0.0, 1.0, 0.0);
PwVlstSetXYZ2(hVL, n2(0, 2), 0.0, 2.0, 0.0);
PwVlstSetXYZ2(hVL, n2(1, 0), 1.0, 0.0, 0.0);
PwVlstSetXYZ2(hVL, n2(1, 1), 1.0, 1.0, 0.0);
PwVlstSetXYZ2(hVL, n2(1, 2), 1.0, 2.0, 0.0);
}
}

The doCreateStrDom() helper functions:

inline static const PWGM_INDEX2 &
n2(const PWP_INT32 i, const PWP_INT32 j)
{
static PWGM_INDEX2 ret;
ret.i = i;
ret.j = j;
return ret;
}

Definition at line 1366 of file apiGridModel.cxx.