From 0905ebebc7da9063ee7dae723e097552f89c1333 Mon Sep 17 00:00:00 2001 From: DarioS Date: Sun, 20 Feb 2022 19:32:19 +0100 Subject: [PATCH] EgtMachKernel 2.4b5 : - migliorato CalcOffset di WaterJet. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes WaterJetting.cpp | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index cdab7332f9d3f0329b735fe38fba5dfc0daea553..f7e27c7d03e6a10a804bfaf9298785d0fcdce914 100644 GIT binary patch delta 97 zcmewt{V#gMFE&Qg&A-`fnHfzdKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUO4BcK2P delta 97 zcmewt{V#gMFE&P#&A-`fnHfzcKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUI`BbWdH diff --git a/WaterJetting.cpp b/WaterJetting.cpp index 907edfe..e469ef9 100644 --- a/WaterJetting.cpp +++ b/WaterJetting.cpp @@ -2762,8 +2762,15 @@ WaterJetting::CalcCorrDir( const ICurveComposite* pCompo, double dU) bool WaterJetting::CalcOffset( ICurveComposite* pCompo, double dSignOffs) { + // determino opzioni di offset + int nFlag = ICurve::OFF_EXTEND ; + if ( pCompo->IsClosed()) { + Vector3d vtStart ; pCompo->GetStartDir( vtStart) ; + Vector3d vtEnd ; pCompo->GetEndDir( vtEnd) ; + if ( ! AreSameVectorEpsilon( vtStart, vtEnd, sin( 5 * DEGTORAD))) + nFlag |= ICurve::OFF_FORCE_OPEN ; + } // eseguo offset semplice - int nFlag = ICurve::OFF_EXTEND | ICurve::OFF_FORCE_OPEN ; if ( pCompo->SimpleOffset( dSignOffs, nFlag)) return true ; // se curva piatta, provo con offset avanzato