diff --git a/EGkDistPointCurve.h b/EGkDistPointCurve.h index b4b5b47..a41b50a 100644 --- a/EGkDistPointCurve.h +++ b/EGkDistPointCurve.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2013-2014 +// EgalTech 2013-2024 //---------------------------------------------------------------------------- -// File : EGkDistPointCurve.h Data : 02.01.14 Versione : 1.5a1 +// File : EGkDistPointCurve.h Data : 20.05.24 Versione : 2.6e5 // Contenuto : Dichiarazione della classe distanza punto da Curva. // // @@ -68,7 +68,6 @@ class DistPointCurve EGK_EXPORT bool GetMinDistInfo( int nInd, MinDistPCInfo& aInfo) const ; private : - DistPointCurve( void) ; void LineCalculate( const Point3d& ptP, const ICurve& Curve, bool bIsSegment) ; void ArcCalculate( const Point3d& ptP, const ICurve& Curve) ; void CrvBezierCalculate( const Point3d& ptP, const ICurve& Curve) ; diff --git a/EGkDistPointLine.h b/EGkDistPointLine.h new file mode 100644 index 0000000..8aa235a --- /dev/null +++ b/EGkDistPointLine.h @@ -0,0 +1,65 @@ +//---------------------------------------------------------------------------- +// EgalTech 2013-2024 +//---------------------------------------------------------------------------- +// File : EGkDistPointLine.h Data : 20.05.24 Versione : 2.6e5 +// Contenuto : Dichiarazione della classe distanza punto da linea/segmento. +// +// +// +// Modifiche : 30.12.12 DS Creazione modulo. +// 20.05.24 DS Pubblicato in Include. +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkPoint3d.h" +#include "/EgtDev/Include/EGkCurveLine.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + + +//----------------------------------------------------------------------------- +class DistPointLine +{ + friend class DistPointCurve ; + + public : + EGK_EXPORT DistPointLine( const Point3d& ptP, + const ICurveLine& crvLine, bool bIsSegment = true) ; + EGK_EXPORT DistPointLine( const Point3d& ptP, + const Point3d& ptIni, const Point3d& ptFin, bool bIsSegment = true) ; + EGK_EXPORT DistPointLine( const Point3d& ptP, + const Point3d& ptIni, const Vector3d& vtDir, double dLen, bool bIsSegment = true) ; + + public : + EGK_EXPORT bool GetSqDist( double& dSqDist) const ; + EGK_EXPORT bool GetDist( double& dDist) const ; + EGK_EXPORT bool IsEpsilon( double dTol) const + { double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; } + EGK_EXPORT bool IsSmall( void) const + { return IsEpsilon( EPS_SMALL) ; } + EGK_EXPORT bool IsZero( void) const + { return IsEpsilon( EPS_ZERO) ; } + EGK_EXPORT int GetNbrMinDist( void) const + { return (( m_dSqDist < 0) ? 0 : 1) ; } + EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDist) const ; + EGK_EXPORT bool GetParamAtMinDistPoint( double& dParam) const ; + + private : + void Calculate( const Point3d& ptP, + const Point3d& ptIni, const Vector3d& vtDir, double dLen, bool bIsSegment) ; + + private : + double m_dSqDist ; + mutable double m_dDist ; + double m_dParam ; + Point3d m_ptMinDist ; +} ; + diff --git a/EXeExecutor.h b/EXeExecutor.h index b5e0bae..3ac17a3 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -665,6 +665,7 @@ EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ; EXE_EXPORT bool ExeSurfTmSetShowEdges( int nId, bool bShow) ; EXE_EXPORT bool ExeSurfTmGetShowEdges( int nId, bool& bShow) ; EXE_EXPORT bool ExeSurfBzTrim( int nId, int nCutterId) ; +EXE_EXPORT bool ExeSurfTmSetSmoothAng( int nId, double dAngDeg) ; // GeomDb Volume Modify EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ; @@ -732,7 +733,7 @@ EXE_EXPORT bool ExeCurveCompoCenter( int nId, int nSimpCrv, int nRefId, Point3d& EXE_EXPORT bool ExeCurveCompoRadius( int nId, int nSimpCrv, double& dRad) ; EXE_EXPORT bool ExeCurveCompoAngCenter( int nId, int nSimpCrv, double& dAngCen) ; EXE_EXPORT bool ExeCurveCompoNormVersor( int nId, int nSimpCrv, int nRefId, Vector3d& vtNorm) ; -EXE_EXPORT int ExeShowCurveBezierControlPoints( int nCrvId, int* pnCount) ; +EXE_EXPORT int ExeShowCurveBezierControlPoints( int nCrvId, int* pnCount) ; // GeomDb Surf Get EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ;