EgtGeomKernel 2.6l2 :

- tolta da interfaccia ISurfTriMesh il metodo CreateByRegion (usare al suo posto la funzione GetSurfTriMeshByRegion)
- aggiunta la funzione GetSurfTriMeshEmpty.
This commit is contained in:
Dario Sassi
2024-12-04 15:04:26 +01:00
parent cb9dd807ce
commit 62a3405d6a
4 changed files with 15 additions and 3 deletions
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -1300,7 +1300,7 @@ GetSurfTriMeshSwept( const ISurfFlatRegion* pSfrSect, const ICurve* pGuide, cons
}
}
// creo il cap sull'inizio e lo attacco alla swept ( è già in posizione giusta)
PtrOwner<ISurfTriMesh> pSci( CreateSurfTriMesh()) ;
PtrOwner<SurfTriMesh> pSci( CreateBasicSurfTriMesh()) ;
INTMATRIX vnPLIndMat ;
if ( ! pSci->CreateByRegion( vPLi, vnPLIndMat))
return nullptr ;
@@ -1310,7 +1310,7 @@ GetSurfTriMeshSwept( const ISurfFlatRegion* pSfrSect, const ICurve* pGuide, cons
if ( ! pStmSwept->GetLoops( vPLe))
return nullptr ;
// creo la superficie alla fine e la attacco
PtrOwner<ISurfTriMesh> pSce( CreateSurfTriMesh()) ;
PtrOwner<SurfTriMesh> pSce( CreateBasicSurfTriMesh()) ;
vnPLIndMat.clear() ;
if ( ! pSce->CreateByRegion( vPLe, vnPLIndMat))
return nullptr ;
+12
View File
@@ -22,6 +22,18 @@
using namespace std ;
//-------------------------------------------------------------------------------
ISurfTriMesh*
GetSurfTriMeshEmpty( void)
{
// creo oggetto con superficie vuota
PtrOwner<SurfTriMesh> pStm( CreateBasicSurfTriMesh()) ;
if ( IsNull( pStm) || ! pStm->AdjustTopology())
return nullptr ;
// restituisco la superficie
return Release( pStm) ;
}
//-------------------------------------------------------------------------------
static SurfTriMesh*
GetStandardSurfTriMeshBox( double dDimX, double dDimY, double dHeight)
+1 -1
View File
@@ -251,7 +251,6 @@ class SurfTriMesh : public ISurfTriMesh, public IGeoObjRW
bool RemoveTriangle( int nId) override ;
bool AdjustTopology( void) override ;
bool CreateByFlatContour( const PolyLine& PL) override ;
bool CreateByRegion( const POLYLINEVECTOR& vPL, const INTMATRIX& vnPLIndMat) override ;
bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) override ;
bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) override ;
bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nRuledType) override ;
@@ -365,6 +364,7 @@ class SurfTriMesh : public ISurfTriMesh, public IGeoObjRW
LOG_ERROR( GetEGkLogger(), "SurfTriMesh : copy error")
return *this ; }
bool Clear( void) ;
bool CreateByRegion( const POLYLINEVECTOR& vPL, const INTMATRIX& vnPLIndMat) ;
bool ExistsTriangle( int nT) const
{ return ( nT >= 0 && nT < GetTriangleSize() && m_vTria[nT].nIdVert[0] != SVT_DEL) ; }
bool GetTriangleAdjacencies( int nId, int nIdAdjTriaId[3]) const ;