EgtGeomKernel :

- piccola correzione.
This commit is contained in:
Daniele Bariletti
2026-06-24 15:42:00 +02:00
parent 1c4198d31c
commit 487ed0b61f
+11 -3
View File
@@ -156,10 +156,14 @@ OffsetCurve3d::Make( const PNT5AXVECTOR& vPnt5Ax, double dOffDist, int nType)
Vector3d vtDirPrevOff = V_INVALID ;
for ( int i = 1 ; i <= pCrv->GetCurveCount() ; ++i) {
pCrvCurr = pCrv->GetNextCurve() ;
if ( pCrvCurr == nullptr && bClosed && vFlag[i] == OffsetCurve3d::AngType::ANG_CVEX)
if ( pCrvCurr == nullptr && bClosed)
pCrvCurr = pCrv->GetFirstCurve() ;
Vector3d vtOffDir = vOffDir[i] ;
Vector3d vtDirCurr ; pCrvCurr->GetStartDir( vtDirCurr) ;
Vector3d vtDirCurr ;
if ( pCrvCurr != nullptr)
pCrvCurr->GetStartDir( vtDirCurr) ;
else
vtDirCurr = vtDirPrev ;
pCrvPrev->GetStartDir( vtDirPrev) ;
Vector3d vtTang ;
if ( vFlag[i] != OffsetCurve3d::AngType::ANG_CVEX)
@@ -176,7 +180,11 @@ OffsetCurve3d::Make( const PNT5AXVECTOR& vPnt5Ax, double dOffDist, int nType)
dCorrK = 1 / sin( 90 - dHalfAlfa) ;
}
Point3d ptP ; pCrvCurr->GetStartPoint( ptP) ;
Point3d ptP ;
if ( pCrvCurr != nullptr)
pCrvCurr->GetStartPoint( ptP) ;
else
pCrvPrev->GetEndPoint( ptP) ;
dRadCorr = dOffDist ;
ptP = ptP + dRadCorr * dCorrK * vtCorr ;
// se secondo punto di angolo esterno di fianco, inserisco movimenti intermedi