From f84aefc82df96977c855f7657284a862eb7f184a Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 27 Feb 2023 08:15:40 +0100 Subject: [PATCH] =?UTF-8?q?EgtGeomKernel=202.5b3=20:=20-=20migliorato=20ri?= =?UTF-8?q?conoscimento=20complanarit=C3=A0=20per=20contorni=20che=20devon?= =?UTF-8?q?o=20generare=20regioni.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EgtGeomKernel.rc | Bin 11710 -> 11710 bytes EgtGeomKernel.vcxproj | 2 ++ SurfFlatRegion.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index dd55861278c64be58995aeddf8ca4007d356d7c7..f4d2aa38bbb603ae5378c40a26474ac4c704f691 100644 GIT binary patch delta 94 zcmdlNy)SyhFE&Qw&A-_cnHh~ID{|{@_Trkr0u;H;XNwSVW8B;$>;>dw2zN+>g;Df- LFmBFL4&ed-W11TR delta 94 zcmdlNy)SyhFE&P_&A-_cnHh~HD{|{@_Trkr0u;H;XNwSVW8B;$>;>dw2zN+>g;Df- LFmBFL4&ed-Vf-5U diff --git a/EgtGeomKernel.vcxproj b/EgtGeomKernel.vcxproj index b6cd7ba..960f459 100644 --- a/EgtGeomKernel.vcxproj +++ b/EgtGeomKernel.vcxproj @@ -116,6 +116,7 @@ true ProgramDatabase false + stdcpp17 Windows @@ -198,6 +199,7 @@ copy $(TargetPath) \EgtProg\DllD64 true false ProgramDatabase + stdcpp17 Windows diff --git a/SurfFlatRegion.cpp b/SurfFlatRegion.cpp index 215f434..d2bd04a 100644 --- a/SurfFlatRegion.cpp +++ b/SurfFlatRegion.cpp @@ -143,11 +143,11 @@ SurfFlatRegion::AddSimpleExtLoop( ICurve* pCrv) else { // verifico che il piano della curva coincida con quello XY intrinseco plPlane.ToLoc( m_frF) ; - if ( ! ( plPlane.GetVersN().IsZplus() || plPlane.GetVersN().IsZminus()) || abs( plPlane.GetDist()) > EPS_SMALL) + if ( ! plPlane.GetVersN().IsZ() || abs( plPlane.GetDist()) > EPS_SMALL) return false ; // sistemo il senso di rotazione (deve essere CCW -> area > 0) - if ( ( plPlane.GetVersN().IsZplus() && dArea < 0) || - ( plPlane.GetVersN().IsZminus() && dArea > 0)) + if ( ( plPlane.GetVersN().z > 0 && dArea < 0) || + ( plPlane.GetVersN().z < 0 && dArea > 0)) pMyCrv->Invert() ; } // porto la curva nel riferimento intrinseco @@ -283,10 +283,10 @@ SurfFlatRegion::AddSimpleIntLoop( ICurve* pCrv) Plane3d plPlane ; if ( ! pMyCrv->GetArea( plPlane, dArea)) return false ; - if ( ! ( plPlane.GetVersN().IsZplus() || plPlane.GetVersN().IsZminus()) || abs( plPlane.GetDist()) > EPS_SMALL) + if ( ! plPlane.GetVersN().IsZ() || abs( plPlane.GetDist()) > EPS_SMALL) return false ; - // sistemo il senso di rotazione (deve essere CW -> se N==Z+ area < 0, se N==Z- area>0) - if ( ( plPlane.GetVersN().IsZplus() && dArea > 0) || ( plPlane.GetVersN().IsZminus() && dArea < 0)) + // sistemo il senso di rotazione (deve essere CW -> se N==Z+ area < 0, se N==Z- area > 0) + if ( ( plPlane.GetVersN().z > 0 && dArea > 0) || ( plPlane.GetVersN().z < 0 && dArea < 0)) pMyCrv->Invert() ; // verifico non abbia auto-intersezioni SelfIntersCurve sInt( *pMyCrv) ;