From bc8a40c5056527c9a2dee9fdc3c2d7494c24c685 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 23 Jan 2017 08:14:08 +0000 Subject: [PATCH] EgtGeomKernel 1.6x4 : - corretta GetSurfFlatRegionFromFatCurve per archi con raggi piccoli su percorso aperto. --- EgtGeomKernel.rc | Bin 11718 -> 11718 bytes SfrCreate.cpp | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 3b1dfb696fc60900298ed7216cad1977962b1bdd..a40bb85a545993e927dda2f1fb139897674f59d8 100644 GIT binary patch delta 131 zcmX>WeJpyzA2vpl&G-4vGfl1&(wY2&Q;pGNvZAo=WFM{#jOLsFay?`Q%i97eg!tsY bTvIns5ca_-*C!2?!)`86|Mbm8${}0;7^p3X delta 131 zcmX>WeJpyzA2vqg&G-4vGfl1&(wY2&Q;pGhvZAo=WFM{#jAonvay?`Q%i97eg!tsY bTvIns5ca_-*C!2?!)`86|Mbm8${}0;6@V># diff --git a/SfrCreate.cpp b/SfrCreate.cpp index 8ea21b8..cf9e4f7 100644 --- a/SfrCreate.cpp +++ b/SfrCreate.cpp @@ -172,11 +172,23 @@ GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, bool bSquareEnds, b if ( IsNull( pCompo2) || ! pCompo2->Invert()) return nullptr ; // offset della prima curva a destra del raggio - if ( ! pCompo1->SimpleOffset( dRadius, nOffsType)) + OffsetCurve OffsCrv1 ; + if ( ! OffsCrv1.Make( pCompo1, dRadius, nOffsType)) return nullptr ; + ICurve* pOffs1 = OffsCrv1.GetLongerCurve() ; + if ( pOffs1 != nullptr) { + pCompo1->Clear() ; + pCompo1->AddCurve( pOffs1) ; + } // offset della seconda curva a destra del raggio - if ( ! pCompo2->SimpleOffset( dRadius, nOffsType)) + OffsetCurve OffsCrv2 ; + if ( ! OffsCrv2.Make( pCompo2, dRadius, nOffsType)) return nullptr ; + ICurve* pOffs2 = OffsCrv2.GetLongerCurve() ; + if ( pOffs2 != nullptr) { + pCompo2->Clear() ; + pCompo2->AddCurve( pOffs2) ; + } // se estremi squadrati if ( bSquareEnds) { // aggiungo alla prima curva una linea che la unisca alla seconda