From 9dbb6fac605dbf7d0eb2ad1139647db088008d24 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 11 Jun 2024 09:32:30 +0200 Subject: [PATCH] Include : - aggiornamento prototipi. --- EGkCAvSilhouetteSurfTm.h | 48 ++++++++++++++++++++++++++++++++++++++++ EGkCAvToolSurfTm.h | 1 + EGkFrame3d.h | 13 ++++++++++- EXeExecutor.h | 4 ++-- 4 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 EGkCAvSilhouetteSurfTm.h diff --git a/EGkCAvSilhouetteSurfTm.h b/EGkCAvSilhouetteSurfTm.h new file mode 100644 index 0000000..6b8b894 --- /dev/null +++ b/EGkCAvSilhouetteSurfTm.h @@ -0,0 +1,48 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024-2024 +//---------------------------------------------------------------------------- +// File : EGkCAvSilhouetteSurfTm.h Data : 08.06.24 Versione : 2.6f2 +// Contenuto : Dichiarazione della funzione calcolo silhouette. +// +// +// +// Modifiche : 08.06.24 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkSurfTriMesh.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 + +//----------------------------------------------------------------------------- +EGK_EXPORT bool CAvSilhouetteSurfTm( const ISurfTriMesh& Stm, const Plane3d& plPlane, double dTol, POLYLINEVECTOR& vPL) ; + +//----------------------------------------------------------------------------- +class CAvParSilhouettesSurfTm +{ + public : + EGK_EXPORT CAvParSilhouettesSurfTm( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol) ; + EGK_EXPORT bool GetSilhouette( double dLevel, POLYLINEVECTOR& vPL) ; + + private : + bool Prepare( void) ; + + private : + CISURFTMPVECTOR m_vpStm ; + Frame3d m_frPlanes ; + Vector3d m_vtMove ; + double m_dTol ; + int m_nStepX ; + int m_nStepY ; + DBLVECTOR m_vdGrid ; + bool m_bGridOk ; +} ; diff --git a/EGkCAvToolSurfTm.h b/EGkCAvToolSurfTm.h index d782334..d6f11ea 100644 --- a/EGkCAvToolSurfTm.h +++ b/EGkCAvToolSurfTm.h @@ -37,6 +37,7 @@ class __declspec( novtable) ICAvToolSurfTm { virtual double GetToolHeight( void) const = 0 ; virtual const ICurveComposite& GetToolOutline( bool bApprox = false) const = 0 ; virtual bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove, double& dTotDist) = 0 ; + virtual bool TestSeries( PNTUVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ; virtual bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol, double dProgCoeff = 1) = 0 ; } ; diff --git a/EGkFrame3d.h b/EGkFrame3d.h index 5fb7f16..05ee1f8 100644 --- a/EGkFrame3d.h +++ b/EGkFrame3d.h @@ -116,11 +116,22 @@ operator/( const Frame3d& frRef, const Frame3d& frDest) return frNew ; } +//---------------------------------------------------------------------------- +//! Restituisce il frame inverso di quello passato +//---------------------------------------------------------------------------- +inline const Frame3d +GetInvert( const Frame3d& frRef) +{ + Frame3d frNew = GLOB_FRM ; + frNew.ToLoc( frRef) ; + return frNew ; +} + //---------------------------------------------------------------------------- //! Restituisce una copia in locale del frame passato //---------------------------------------------------------------------------- inline const Frame3d -GetToLoc ( const Frame3d& frRef, const Frame3d& frDest) +GetToLoc( const Frame3d& frRef, const Frame3d& frDest) { Frame3d frNew = frRef ; frNew.ToLoc( frDest) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index fe3920b..df8ac11 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -761,8 +761,8 @@ EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3 EXE_EXPORT bool ExeSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool& bAdjac, Point3d& ptP1, Point3d& ptP2, double& dAng) ; 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, bool bAllTria = false) ; -EXE_EXPORT int ExeGetSurfTmSilhouetteEx( int nId, const Point3d& ptOn, const Vector3d& vtN, double dToler, int nDestGrpId, int nRefType, - int* pnCount, bool bAllTria) ; +EXE_EXPORT int ExeGetSurfTmParSilhouettes( const INTVECTOR& vIds, const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist, + 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) ;