From 6e15145bf004f766d5b0bca8e7e26859d4d52c7f Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Mon, 10 Jul 2023 11:44:51 +0200 Subject: [PATCH] Include : - merge con Master. --- EGkDistPointSurfTm.h | 18 +++++++++++++++--- EGkSurfTriMesh.h | 6 ++++-- EXeExecutor.h | 7 ++++++- EgtKeyCodes.h | 2 +- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/EGkDistPointSurfTm.h b/EGkDistPointSurfTm.h index f9112e1..f7db94e 100644 --- a/EGkDistPointSurfTm.h +++ b/EGkDistPointSurfTm.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2018-2018 +// EgalTech 2018-2023 //---------------------------------------------------------------------------- -// File : EGkDistPointTria.h Data : 11.12.18 Versione : 1.9l2 +// File : EGkDistPointTria.h Data : 06.07.23 Versione : 2.5g1 // Contenuto : Dichiarazione della classe distanza Punto da Trimesh. // // // // Modifiche : 06.12.18 LM Creazione modulo. -// +// 06.07.23 DS Aggiunta GetSurfTmNearestVertex. // //---------------------------------------------------------------------------- @@ -23,6 +23,13 @@ #define EGK_EXPORT __declspec( dllimport) #endif +//---------------------------------------------------------------------------- +// Calcola la distanza tra punto e superficie trimesh. +// Risultati : +// - distanza +// - punto sulla superficie a minima distanza +// - indice del triangolo su cui giace il punto +// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie. //---------------------------------------------------------------------------- class DistPointSurfTm { @@ -51,3 +58,8 @@ class DistPointSurfTm int m_nMinDistTriaIndex ; bool m_bIsInside ; } ; + +//---------------------------------------------------------------------------- +// Calcola l'indice del vertice della superficie a minima distanza dal punto di riferimento. +//---------------------------------------------------------------------------- +EGK_EXPORT int GetSurfTmNearestVertex( const Point3d& ptP, const ISurfTriMesh& tmSurf) ; \ No newline at end of file diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 0f20b31..e37521a 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2022 +// EgalTech 2014-2023 //---------------------------------------------------------------------------- -// File : EGkSurfTriMesh.h Data : 10.10.22 Versione : 2.4i4 +// File : EGkSurfTriMesh.h Data : 07.07.23 Versione : 2.5g1 // Contenuto : Dichiarazione della interfaccia ISurfTriMesh. // // @@ -44,6 +44,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual void SetBoundaryAngle( double dBoundaryAngDeg) = 0 ; virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ; virtual int AddVertex( const Point3d& ptVert) = 0 ; + virtual bool MoveVertex( int nInd, const Point3d& ptNewVert) = 0 ; virtual int AddTriangle( const int nIdVert[3], int nTFlag = 0) = 0 ; virtual bool RemoveTriangle( int nId) = 0 ; virtual bool AdjustTopology( void) = 0 ; @@ -89,6 +90,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual int GetFacetSize( void) const = 0 ; virtual int GetFacetFromTria( int nT) const = 0 ; virtual bool GetAllTriaInFacet( int nF, INTVECTOR& vT) const = 0 ; + virtual bool GetAllVertInFacet( int nF, INTVECTOR& vVert) const = 0 ; virtual bool GetFacetLoops( int nF, POLYLINEVECTOR& vPL) const = 0 ; virtual bool GetFacetAdjacencies( int nF, INTMATRIX& vAdj) const = 0 ; virtual bool GetFacetNearestEndPoint( int nF, const Point3d& ptNear, Point3d& ptEnd, Vector3d& vtN) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index d82c2f4..93fe0cc 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -590,6 +590,7 @@ EXE_EXPORT bool ExeSurfFrIntersect( int nId1, int nId2) ; EXE_EXPORT bool ExeSurfFrOffset( int nId, double dDist, int nType) ; EXE_EXPORT bool ExeSurfFrMoveSimpleNoCollision( int nId1, int nId2, const Vector3d& vtDir, double& dLen, int nRefType) ; EXE_EXPORT bool ExeSurfFrRotateSimpleNoCollision( int nId1, int nId2, const Point3d& ptCen, double& dAngDeg, int nRefType) ; +EXE_EXPORT bool ExeSurfTmMoveVertex( int nId, int nVert, const Point3d& ptNewVert, int nRefType, bool bUpdate) ; EXE_EXPORT int ExeSurfTmToTriangles( int nId, int* pnCount) ; EXE_EXPORT bool ExeSurfTmRemoveFacet( int nId, int nFacet) ; EXE_EXPORT bool ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2) ; @@ -675,8 +676,11 @@ EXE_EXPORT int ExeSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, i EXE_EXPORT int ExeExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ; EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bStepCorrection, bool bInvert, int* pnCount) ; -EXE_EXPORT int ExeSurfTmPartCount( int nId) ; +EXE_EXPORT int ExeSurfTmVertexCount( int nId) ; EXE_EXPORT int ExeSurfTmFacetCount( int nId) ; +EXE_EXPORT int ExeSurfTmPartCount( int nId) ; +EXE_EXPORT bool ExeSurfTmGetVertex( int nId, int nVert, int nRefId, Point3d& ptVert) ; +EXE_EXPORT bool ExeSurfTmGetNearestVertex( int nId, const Point3d& ptNear, int nRefId, int& nVert, Point3d& ptVert) ; EXE_EXPORT int ExeSurfTmFacetFromTria( int nId, int nT) ; EXE_EXPORT bool ExeSurfTmFacetAdjacencies( int nId, int nFacet, INTMATRIX& vAdj) ; EXE_EXPORT bool ExeSurfTmFacetNearestEndPoint( int nId, int nFacet, const Point3d& ptNear, int nRefId, @@ -695,6 +699,7 @@ EXE_EXPORT int ExeExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ; EXE_EXPORT int ExeGetSurfTmSilhouette( int nId, const Vector3d& vtDir, double dToler, int nDestGrpId, int nRefType, int* pnCount) ; EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; +EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVert) ; EXE_EXPORT bool ExeSurfTmGetFacetBBox( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; EXE_EXPORT bool ExeSurfTmGetFacetBBoxGlob( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; EXE_EXPORT bool ExeSurfTmGetFacetBBoxRef( int nId, int nFacet, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ; diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 5184ef5..8a7f9a0 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2506 ; +const int KEY_BASELIB_VER = 2507 ; const int KEY_BASELIB_LEV = 1 ; //----------------------------------------------------------------------------