EgtInterface 1.9c4 :
- aggiunte interfacce per EgtSurfTmFacetAdjacencies e EgtSurfTmFacetsContact.
This commit is contained in:
@@ -504,10 +504,61 @@ __stdcall EgtSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, double vtNo
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetAdjacencies( int nId, int nFacet, int*& vAdj, int* pnCount)
|
||||
{
|
||||
// verifica parametri di ritorno
|
||||
if ( &vAdj == nullptr || pnCount == nullptr)
|
||||
return FALSE ;
|
||||
// eseguo
|
||||
INTMATRIX vTmp ;
|
||||
if ( ! ExeSurfTmFacetAdjacencies( nId, nFacet, vTmp))
|
||||
return FALSE ;
|
||||
// recupero il risultato
|
||||
int nDim = 0 ;
|
||||
for ( int i = 0 ; i < int( vTmp.size()) ; ++ i)
|
||||
nDim += int( vTmp[i].size()) + 1 ;
|
||||
vAdj = (int*) malloc( nDim * sizeof( int)) ;
|
||||
if ( vAdj == nullptr)
|
||||
return FALSE ;
|
||||
int nCount = 0 ;
|
||||
for ( int i = 0 ; i < int( vTmp.size()) ; ++ i) {
|
||||
for ( int j = 0 ; j < int( vTmp[i].size()) ; ++ j) {
|
||||
vAdj[nCount] = vTmp[i][j] ;
|
||||
nCount ++ ;
|
||||
}
|
||||
vAdj[nCount] = - 2 ;
|
||||
nCount ++ ;
|
||||
}
|
||||
*pnCount = nCount ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool* pbAdjac, double ptP1[3], double ptP2[3], double* pdAng)
|
||||
{
|
||||
// verifica parametri di ritorno
|
||||
if ( pbAdjac == nullptr || ptP1 == nullptr || ptP2 == nullptr || pdAng == nullptr)
|
||||
return FALSE ;
|
||||
// eseguo
|
||||
Point3d ptMyP1, ptMyP2 ;
|
||||
if ( ! ExeSurfTmFacetsContact( nId, nF1, nF2, nRefId, *pbAdjac, ptMyP1, ptMyP2, *pdAng))
|
||||
return FALSE ;
|
||||
// assegno risultati
|
||||
VEC_FROM_3D( ptP1, ptMyP1)
|
||||
VEC_FROM_3D( ptP2, ptMyP2)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtTextNormVersor( int nId, int nRefId, double vtNorm[3])
|
||||
{
|
||||
// verifica parametro di ritorno
|
||||
if ( vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il vettore normale
|
||||
Vector3d vtTmp ;
|
||||
if ( ! ExeTextNormVersor( nId, nRefId, vtTmp))
|
||||
|
||||
Reference in New Issue
Block a user