EgtInterface :

- aggiornata interfaccia di EgtSurfBezierParamsFromPoint
- aggiunta interfaccia di EgtSurfBezierGetPointNrmD1.
This commit is contained in:
Dario Sassi
2026-03-13 13:35:00 +01:00
parent 9d89ccb1d7
commit 75d251f561
2 changed files with 36 additions and 10 deletions
+32 -8
View File
@@ -344,17 +344,41 @@ __stdcall EgtCopySurfTmFacet( int nId, int nFacet, int nDestGrpId)
return ExeCopySurfTmFacet( nId, nFacet, nDestGrpId) ;
}
//----------------------------------------------------------------------------
BOOL
__stdcall EgtSurfBezierParamsFromPoint( int nSurfId, const double ptOnSurf[3], int nRefId, double* pdU, double* pdV)
{
// verifica parametri
if ( ptOnSurf == nullptr || pdU == nullptr || pdV == nullptr)
return FALSE ;
// eseguo
return ( ExeSurfBezierParamsFromPoint( nSurfId, ptOnSurf, nRefId, *pdU, *pdV) ? TRUE : FALSE) ;
}
//----------------------------------------------------------------------------
BOOL
__stdcall EgtSurfBezierGetPointNrmD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId,
double ptP[3], double vtNorm[3], double vtDerU[3], double vtDerV[3])
{
// verifica parametri di ritorno
if ( ptP == nullptr || vtNorm == nullptr || vtDerU == nullptr || vtDerV == nullptr)
return FALSE ;
// eseguo
Point3d ptMyP ;
Vector3d vtMyNorm, vtMyDerU, vtMyDerV ;
if ( ! ExeSurfBezierGetPointNrmD1( nSurfId, dU, dV, nUsd, nVsd, nRefId, ptMyP, vtMyNorm, vtMyDerU, vtMyDerV))
return FALSE ;
// assegno risultati
VEC_FROM_3D( ptP, ptMyP)
VEC_FROM_3D( vtNorm, vtMyNorm)
VEC_FROM_3D( vtDerU, vtMyDerU)
VEC_FROM_3D( vtDerV, vtMyDerV)
return TRUE ;
}
//----------------------------------------------------------------------------
int
__stdcall EgtExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount)
{
return ExeExtractSurfBezierLoops( nId, nDestGrpId, pnCount) ;
}
//----------------------------------------------------------------------------
BOOL
__stdcall EgtSurfBezParamsFromPoint( int nIdSurf, double ptPBez[3], int nDestGroup, double& dU, double& dV)
{
bool bOk = ExeSurfBezParamsFromPoint( nIdSurf, ptPBez, nDestGroup, dU, dV) ;
return ( bOk ? TRUE : FALSE) ;
}