EgtExecutor 2.7c3 :
- adattamenti per modifiche a GeomKernel.
This commit is contained in:
+11
-11
@@ -2349,12 +2349,12 @@ MyProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int n
|
||||
return false ;
|
||||
Vector3d vtProjL = GetVectorLocal( pGeomDB, vtProj, nRefType, frCrv) ;
|
||||
vtProjL.LocToLoc( frCrv, frStm) ;
|
||||
// vanno affilati gli spigoli solo se direzione non da proiezione
|
||||
bool bSharpEdges = ( ! bDirFromProj) ;
|
||||
// eseguo la proiezione
|
||||
PNT5AXVECTOR vPt5ax ;
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pSurf, vtProjL, dLinTol, dMaxSegmLen, vPt5ax))
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pSurf, vtProjL, dLinTol, dMaxSegmLen, bSharpEdges, vPt5ax))
|
||||
return false ;
|
||||
// rimuovo i punti allineati entro la tolleranza e non più lontani tra loro del massimo
|
||||
RemovePointsInExcess( vPt5ax, dLinTol, dMaxSegmLen, ! bDirFromProj) ;
|
||||
// inserisco la composita nel gruppo destinazione
|
||||
PtrOwner<ICurveComposite> pCompo ;
|
||||
for ( const auto& Pt5ax : vPt5ax) {
|
||||
@@ -2376,7 +2376,7 @@ MyProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int n
|
||||
PtrOwner<IGeoVector3d> pGeoVct( CreateGeoVector3d()) ;
|
||||
if ( IsNull( pGeoVct))
|
||||
return false ;
|
||||
Vector3d vtDir = ( bDirFromProj ? Pt5ax.vtDir2 : Pt5ax.vtDir) ;
|
||||
Vector3d vtDir = ( bDirFromProj ? Pt5ax.vtDir2 : Pt5ax.vtDir1) ;
|
||||
pGeoVct->Set( 10 * GetLocToLoc( vtDir, frStm, frDest), GetLocToLoc( Pt5ax.ptP, frStm, frDest)) ;
|
||||
int nNewId = pGeomDB->AddGeoObj( GDB_ID_NULL, nDestGrpId, Release( pGeoVct)) ;
|
||||
if ( nNewId == GDB_ID_NULL)
|
||||
@@ -2392,7 +2392,7 @@ MyProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int n
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType)
|
||||
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType)
|
||||
{
|
||||
bool bOk = MyProjectCurveOnSurf( nCurveId, nSurfTmId, vtProj, nDestGrpId, dLinTol, dMaxSegmLen, bDirFromProj, nRefType) ;
|
||||
ExeSetModified() ;
|
||||
@@ -2459,6 +2459,8 @@ MyProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrp
|
||||
CurveLocal CrvLoc( pCrv, frCrv, frStm) ;
|
||||
if ( CrvLoc.Get() == nullptr)
|
||||
return false ;
|
||||
// vanno affilati gli spigoli solo se direzione non da guida
|
||||
bool bSharpEdges = ( ! bDirFromGuide) ;
|
||||
// eseguo l'opportuna proiezione dopo aver portato l'entità guida nel riferimento della superficie
|
||||
PNT5AXVECTOR vPt5ax ;
|
||||
if ( pGdePnt != nullptr) {
|
||||
@@ -2466,14 +2468,14 @@ MyProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrp
|
||||
if ( pGdeLoc == nullptr)
|
||||
return false ;
|
||||
pGdeLoc->LocToLoc( frGde, frStm) ;
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pStm, *pGdeLoc, dLinTol, dMaxSegmLen, vPt5ax))
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pStm, *pGdeLoc, dLinTol, dMaxSegmLen, bSharpEdges, vPt5ax))
|
||||
return false ;
|
||||
}
|
||||
else if ( pGdeCrv != nullptr) {
|
||||
CurveLocal GdeLoc( pGdeCrv, frGde, frStm) ;
|
||||
if ( GdeLoc.Get() == nullptr)
|
||||
return false ;
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pStm, *GdeLoc.Get(), dLinTol, dMaxSegmLen, vPt5ax))
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pStm, *GdeLoc.Get(), dLinTol, dMaxSegmLen, bSharpEdges, vPt5ax))
|
||||
return false ;
|
||||
}
|
||||
else { // pGdeStm != nullptr
|
||||
@@ -2481,11 +2483,9 @@ MyProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrp
|
||||
const ISurf* pGdeLoc = GetSurf( GdeLoc.Get()) ;
|
||||
if ( pGdeLoc == nullptr)
|
||||
return false ;
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pStm, *pGdeLoc, dLinTol, dMaxSegmLen, vPt5ax))
|
||||
if ( ! ProjectCurveOnSurf( *CrvLoc.Get(), *pStm, *pGdeLoc, dLinTol, dMaxSegmLen, bSharpEdges, vPt5ax))
|
||||
return false ;
|
||||
}
|
||||
// rimuovo i punti allineati entro la tolleranza e non più lontani tra loro del massimo
|
||||
RemovePointsInExcess( vPt5ax, dLinTol, dMaxSegmLen, ! bDirFromGuide) ;
|
||||
// inserisco la composita nel gruppo destinazione
|
||||
PtrOwner<ICurveComposite> pCompo ;
|
||||
for ( const auto& Pt5ax : vPt5ax) {
|
||||
@@ -2507,7 +2507,7 @@ MyProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrp
|
||||
PtrOwner<IGeoVector3d> pGeoVct( CreateGeoVector3d()) ;
|
||||
if ( IsNull( pGeoVct))
|
||||
return false ;
|
||||
Vector3d vtDir = ( bDirFromGuide ? Pt5ax.vtDir2 : Pt5ax.vtDir) ;
|
||||
Vector3d vtDir = ( bDirFromGuide ? Pt5ax.vtDir2 : Pt5ax.vtDir1) ;
|
||||
pGeoVct->Set( 10 * GetLocToLoc( vtDir, frStm, frDest), GetLocToLoc( Pt5ax.ptP, frStm, frDest)) ;
|
||||
int nNewId = pGeomDB->AddGeoObj( GDB_ID_NULL, nDestGrpId, Release( pGeoVct)) ;
|
||||
if ( nNewId == GDB_ID_NULL)
|
||||
|
||||
Reference in New Issue
Block a user