EgtGeomKernel 2.3f3 :

- corretto crash in offset di curva generica con estrusione coincidente con linea.
This commit is contained in:
DarioS
2021-06-22 20:17:13 +02:00
parent d972d11e0f
commit 4b1bf75911
2 changed files with 14 additions and 6 deletions
BIN
View File
Binary file not shown.
+14 -6
View File
@@ -178,17 +178,25 @@ OffsetCurve::Make( const ICurve* pCrv, double dDist, int nType)
if ( IsNull( pCrv1))
return false ;
pCrv1->SetTempProp( nInd1) ;
if ( ! pCrv1->SimpleOffset( dDist, ICurve::OFF_FILLET) &&
GetBasicCurveArc( pCrv1)->MyExtendedOffset( dDist, true, ICurve::OFF_FILLET))
pCrv1->SetTempProp( - nInd1) ;
if ( ! pCrv1->SimpleOffset( dDist, ICurve::OFF_FILLET)) {
CurveArc* pArc = GetBasicCurveArc( pCrv1) ;
if ( pArc == nullptr)
return false ;
if ( pArc->MyExtendedOffset( dDist, true, ICurve::OFF_FILLET))
pCrv1->SetTempProp( - nInd1) ;
}
// curve successive
PtrOwner<ICurve> pCrv2( ccCopy2.RemoveFirstOrLastCurve( false)) ;
while ( ! IsNull( pCrv2)) {
// eseguo semplice offset
pCrv2->SetTempProp( nInd1 + 1) ;
if ( ! pCrv2->SimpleOffset( dDist, ICurve::OFF_FILLET) &&
GetBasicCurveArc( pCrv2)->MyExtendedOffset( dDist, true, ICurve::OFF_FILLET))
pCrv2->SetTempProp( - (nInd1 + 1)) ;
if ( ! pCrv2->SimpleOffset( dDist, ICurve::OFF_FILLET)) {
CurveArc* pArc = GetBasicCurveArc( pCrv2) ;
if ( pArc == nullptr)
return false ;
if ( pArc->MyExtendedOffset( dDist, true, ICurve::OFF_FILLET))
pCrv2->SetTempProp( - ( nInd1 + 1)) ;
}
// verifico relazione con la curva precedente e aggiungo eventuali curve intermedie
CurveComposite ccTemp ;
bool bOk = VerifyAndAdjustExternalAngle( pCrv1, pCrv2, vAngs[nInd1], dDist, ICurve::OFF_FILLET, ccTemp) ;