From f75fc31c7e2698837d267423ec4393f023b6d2bd Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 26 Mar 2025 11:28:11 +0100 Subject: [PATCH] EgtExecutor 2.7c3 : - adattamenti per modifiche a GeomKernel. --- EXE_GdbModifyCurve.cpp | 22 +++++++++++----------- EgtExecutor.rc | Bin 18890 -> 18890 bytes 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/EXE_GdbModifyCurve.cpp b/EXE_GdbModifyCurve.cpp index 302f7d0..ee24c05 100644 --- a/EXE_GdbModifyCurve.cpp +++ b/EXE_GdbModifyCurve.cpp @@ -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 pCompo ; for ( const auto& Pt5ax : vPt5ax) { @@ -2376,7 +2376,7 @@ MyProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int n PtrOwner 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 pCompo ; for ( const auto& Pt5ax : vPt5ax) { @@ -2507,7 +2507,7 @@ MyProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrp PtrOwner 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) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 46aabcfe2116950eaf8665ad9204056e914c50e3..16131bc4bdd74795875d8c2e9da18c41e82cc30f 100644 GIT binary patch delta 249 zcmX>#neo(Q#trM3wOtwV7}6PX7%~}(88R3Y7&I6{fg+ghlj4}o{f@#neo(Q#trM3)jb*V7}6PX7*ZLEfmne-gCUrqgdq`#Gl9HNpll|Hz4<1yA~U1W z=HG0tAj*+zISZI~oN4j~!74_h$&OsfoBM=pK%%F`z-k1g5Na9}VQS)(_~ePTbn;DR v>B%45mQCh!STy;UlYn48*nys42j&1BmIzeQx_OSX4l`CM>CGS9ZZQD>qK-hl