diff --git a/CDeTriaTria.cpp b/CDeTriaTria.cpp index c4499f0..c9fd818 100644 --- a/CDeTriaTria.cpp +++ b/CDeTriaTria.cpp @@ -12,11 +12,10 @@ //---------------------------------------------------------------------------- #include "stdafx.h" -#include "DistLineLine.h" #include "CDeTriaTria.h" +#include "/EgtDev/Include/EGkDistLineLine.h" #include "/EgtDev/Include/EGkIntersPlanePlane.h" #include -#include using namespace std ; diff --git a/CurveComposite.cpp b/CurveComposite.cpp index a5f0ae0..a6132ee 100644 --- a/CurveComposite.cpp +++ b/CurveComposite.cpp @@ -745,7 +745,7 @@ CurveComposite::Load( NgeReader& ngeIn) ICurve* pCrv = ::GetCurve( pGeoO) ; bOk = bOk && ( pCrv != nullptr && pCrv->IsSimple()) ; // aggiungo questa curva (sicuramente semplice) - bOk = bOk && AddSimpleCurve( pCrv) ; + bOk = bOk && AddSimpleCurve( pCrv, true, 10 * EPS_SMALL) ; // se errore if ( ! bOk) return false ; diff --git a/DistLineLine.cpp b/DistLineLine.cpp index a045b45..4a31c30 100644 --- a/DistLineLine.cpp +++ b/DistLineLine.cpp @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2020-2022 +// EgalTech 2020-2024 //---------------------------------------------------------------------------- -// File : DistLineLine.h Data : 12.08.22 Versione : 2.4h1 +// File : DistLineLine.cpp Data : 10.05.24 Versione : 2.6e3 // Contenuto : Implementazione della classe distanza fra elementi lineari. // // @@ -12,11 +12,10 @@ //---------------------------------------------------------------------------- #include "stdafx.h" -#include "DistLineLine.h" +#include "/EgtDev/Include/EGkDistLineLine.h" #include "/EgtDev/Include/EgtNumUtils.h" #include "/EgtDev/Include/EGkGeoCollection.h" #include "/EgtDev/Include/EGkGeoConst.h" -#include using namespace std ; diff --git a/DistLineLine.h b/DistLineLine.h deleted file mode 100644 index 1315c29..0000000 --- a/DistLineLine.h +++ /dev/null @@ -1,53 +0,0 @@ -//---------------------------------------------------------------------------- -// EgalTech 2020-2020 -//---------------------------------------------------------------------------- -// File : DistLineLine.h Data : 06.11.20 Versione : 2.2k1 -// Contenuto : Dichiarazione della classe distanza fra elementi lineari. -// -// -// -// Modifiche : 06.11.20 LM Creazione modulo. -// -// -//---------------------------------------------------------------------------- - -#pragma once - -#include "/EgtDev/Include/EGkVector3d.h" -#include "/EgtDev/Include/EGkPoint3d.h" - -//---------------------------------------------------------------------------- -class DistLineLine -{ - public : - DistLineLine( const Point3d& ptSt1, const Point3d& ptEn1, - const Point3d& ptSt2, const Point3d& ptEn2, - bool bIsSegment1 = true, bool bIsSegment2 = true) ; - DistLineLine( const Point3d& ptSt1, const Vector3d& vtD1, double dLen1, - const Point3d& ptSt2, const Vector3d& vtD2, double dLen2, - bool bIsSegment1 = true, bool bIsSegment2 = true) ; - - public : - bool GetSqDist( double& dSqDist) const ; - bool GetDist( double& dDist) const ; - bool IsEpsilon( double dTol) const - { double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; } - bool IsSmall( void) const - { return IsEpsilon( EPS_SMALL) ; } - bool IsZero( void) const - { return IsEpsilon( EPS_ZERO) ; } - bool GetMinDistPoints( Point3d& ptMinDist1, Point3d& ptMinDist2) const ; - bool GetPositionsAtMinDistPoints( double& dPos1, double& dPos2) const ; - - private : - void Calculate( const Point3d& ptSt1, const Vector3d& vtD1, double dLen1, - const Point3d& ptSt2, const Vector3d& vtD2, double dLen2, - bool bIsSegment1, bool bIsSegment2) ; - private: - double m_dSqDist ; - mutable double m_dDist ; - double m_dPos1 ; - double m_dPos2 ; - Point3d m_ptMinDist1 ; - Point3d m_ptMinDist2 ; -} ; diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 6618a64..8e19baa 100644 Binary files a/EgtGeomKernel.rc and b/EgtGeomKernel.rc differ diff --git a/EgtGeomKernel.vcxproj b/EgtGeomKernel.vcxproj index 801df76..5913a89 100644 --- a/EgtGeomKernel.vcxproj +++ b/EgtGeomKernel.vcxproj @@ -328,6 +328,7 @@ copy $(TargetPath) \EgtProg\Dll64 + @@ -595,7 +596,6 @@ copy $(TargetPath) \EgtProg\Dll64 - diff --git a/EgtGeomKernel.vcxproj.filters b/EgtGeomKernel.vcxproj.filters index edcd982..4f414fe 100644 --- a/EgtGeomKernel.vcxproj.filters +++ b/EgtGeomKernel.vcxproj.filters @@ -1118,9 +1118,6 @@ File di intestazione\Include - - File di intestazione - File di intestazione @@ -1214,6 +1211,9 @@ File di intestazione\Include + + File di intestazione\Include + diff --git a/IntersLineCaps.cpp b/IntersLineCaps.cpp index 0b1553f..fb975b0 100644 --- a/IntersLineCaps.cpp +++ b/IntersLineCaps.cpp @@ -14,7 +14,7 @@ //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "IntersLineCaps.h" -#include "DistLineLine.h" +#include "/EgtDev/Include/EGkDistLineLine.h" #include "/EgtDev/Include/EGkIntersLineSphere.h" using namespace std ; diff --git a/IntersLineTria.cpp b/IntersLineTria.cpp index 436bb44..c831752 100644 --- a/IntersLineTria.cpp +++ b/IntersLineTria.cpp @@ -18,7 +18,7 @@ #include "IntersLineLine.h" #include "IntersLineTria.h" #include "DistPointLine.h" -#include "DistLineLine.h" +#include "/EgtDev/Include/EGkDistLineLine.h" #include "/EgtDev/Include/EGkIntersLinePlane.h" #include "/EgtDev/Include/EGkFrame3d.h" #include diff --git a/SurfTriMesh.cpp b/SurfTriMesh.cpp index 9075f16..5e847b2 100644 --- a/SurfTriMesh.cpp +++ b/SurfTriMesh.cpp @@ -21,9 +21,9 @@ #include "NgeReader.h" #include "SurfFlatRegion.h" #include "DistPointLine.h" -#include "DistLineLine.h" #include "Triangulate.h" #include "GeoConst.h" +#include "/EgtDev/Include/EGkDistLineLine.h" #include "/EgtDev/Include/EGkIntersLinePlane.h" #include "/EgtDev/Include/EGkPointGrid3d.h" #include "/EgtDev/Include/EGkPolyLine.h" diff --git a/SurfTriMeshUtilities.cpp b/SurfTriMeshUtilities.cpp index 738d227..d1a374b 100644 --- a/SurfTriMeshUtilities.cpp +++ b/SurfTriMeshUtilities.cpp @@ -16,7 +16,7 @@ #include "CurveLine.h" #include "Triangulate.h" #include "DistPointLine.h" -#include "DistLineLine.h" +#include "/EgtDev/Include/EGkDistLineLine.h" #include using namespace std ;