EgtGeomKernel 2.1e5 :

- aggiunta funzione SurfTriMesh::GeneralizedCut per taglio TriMesh con curva che rappresenta sezione di cilindro infinito.
This commit is contained in:
Dario Sassi
2019-05-28 15:31:16 +00:00
parent 0f4481f291
commit c93adf402b
7 changed files with 937 additions and 0 deletions
+20
View File
@@ -2174,6 +2174,9 @@ GdbExecutor::ExecuteSurfTriMesh( const string& sCmd2, const STRVECTOR& vsParams)
else if ( sCmd2 == "CLONEPART") {
return SurfTrimeshClonePart( vsParams) ;
}
else if ( sCmd2 == "GENCUT") {
return SurfTrimeshGenCut( vsParams) ;
}
else
return false ;
}
@@ -2649,6 +2652,23 @@ GdbExecutor::SurfTrimeshClonePart( const STRVECTOR& vsParams)
return AddGeoObj(vsParams[0], vsParams[2], Release( pNewSurf)) ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::SurfTrimeshGenCut( const STRVECTOR& vsParams)
{
// Parametri: nSurfId, nCvId
if ( vsParams.size() != 2)
return false ;
// Recupero Id superficie
int nIdSurf = GetIdParam( vsParams[0]) ;
ISurfTriMesh* pStmM = GetSurfTriMesh( m_pGDB->GetGeoObj( nIdSurf)) ;
SurfTriMesh* pStmF = static_cast <SurfTriMesh*> ( pStmM) ;
// Recupero Id curva
int nIdCurve = GetIdParam( vsParams[1]) ;
ICurve* pCurve = GetCurve( m_pGDB->GetGeoObj( nIdCurve)) ;
return pStmF->GeneralizedCut( *pCurve, true) ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::ExecuteVolZmap( const string& sCmd2, const STRVECTOR& vsParams)