From 90d548b69d64173218c17f5366c18f3d3be12a8b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 22 May 2024 08:17:30 +0200 Subject: [PATCH 1/4] Include : - aggiunta DistPointline. --- EGkDistPointCurve.h | 5 ++-- EGkDistPointLine.h | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 EGkDistPointLine.h 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 ; +} ; + From 5b6d056eb934e6b42f18bc3ba749bf431d1421d1 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 22 May 2024 17:19:32 +0200 Subject: [PATCH 2/4] Include : - aggiunta la funzione SetSmoothAngle per superfici Trimesh. --- EXeExecutor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/EXeExecutor.h b/EXeExecutor.h index 53bbeb1..4701f47 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -653,6 +653,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) ; From 129bff73f0f4773c40c7fb3d7a5c60a795c746e9 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 23 May 2024 09:40:24 +0200 Subject: [PATCH 3/4] Include : - cambiato nome alla funzione per mostrare i punti di controllo di una curva di Bezier. --- EXeExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index 4701f47..18a20df 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -721,7 +721,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 bool ExeShowBezierCurveControlPoints( int nCrvId, int* pnCount) ; +EXE_EXPORT bool ExeShowCurveBezierControlPoints( int nCrvId, int* pnCount) ; // GeomDb Surf Get EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ; From f4bb934999166284c25df98d5eb3ec659fd8ebbf Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 23 May 2024 09:58:05 +0200 Subject: [PATCH 4/4] Include : - piccola correzione. --- EXeExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index 18a20df..5a1a2ce 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -721,7 +721,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 bool ExeShowCurveBezierControlPoints( int nCrvId, int* pnCount) ; +EXE_EXPORT int ExeShowCurveBezierControlPoints( int nCrvId, int* pnCount) ; // GeomDb Surf Get EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ;