EgtMachKernel 2.4b5 :

- migliorato CalcOffset di WaterJet.
This commit is contained in:
DarioS
2022-02-20 19:32:19 +01:00
parent d66fdb0e5e
commit 0905ebebc7
2 changed files with 8 additions and 1 deletions
BIN
View File
Binary file not shown.
+8 -1
View File
@@ -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