diff --git a/EGkBBox3d.h b/EGkBBox3d.h index 678d365..b363bf2 100644 --- a/EGkBBox3d.h +++ b/EGkBBox3d.h @@ -100,6 +100,18 @@ class EGK_EXPORT BBox3d if ( dSqDist < EPS_ZERO) return 0 ; return sqrt( dSqDist) ; } + double SqMaxDistFromPoint( const Point3d& ptP) const ; + double SqMaxDistFromPointXY( const Point3d& ptP) const ; + double MaxDistFromPoint( const Point3d& ptP) const + { double dSqDist = SqMaxDistFromPoint( ptP) ; + if ( dSqDist < EPS_ZERO) + return 0 ; + return sqrt( dSqDist) ; } + double MaxDistFromPointXY( const Point3d& ptP) const + { double dSqDist = SqMaxDistFromPointXY( ptP) ; + if ( dSqDist < EPS_ZERO) + return 0 ; + return sqrt( dSqDist) ; } private : bool IsValid( void) const ; diff --git a/EGkIntersLineSurfTm.h b/EGkIntersLineSurfTm.h index cdfbe9a..7ba7a02 100644 --- a/EGkIntersLineSurfTm.h +++ b/EGkIntersLineSurfTm.h @@ -46,4 +46,4 @@ typedef std::vector ILSIVECTOR ; //----------------------------------------------------------------------------- EGK_EXPORT bool IntersLineSurfTm( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfTriMesh& Stm, - ILSIVECTOR& vInfo) ; + ILSIVECTOR& vInfo, bool bFinite = true) ; diff --git a/EInAPI.h b/EInAPI.h index 7ba8f3c..458f630 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -479,8 +479,11 @@ EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, co double ptMid[3], double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtSurfTmFacetCenter( int nId, int nFacet, int nRefId, double ptCen[3], double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, double vtNorm[3]) ; +EIN_EXPORT BOOL __stdcall EgtSurfTmFacetOppositeSide( int nId, int nFacet, const double vtDir[3], int nRefId, double ptP1[3], double ptP2[3]) ; EIN_EXPORT BOOL __stdcall EgtSurfTmFacetAdjacencies( int nId, int nFacet, int*& vAdj, int* pnCount) ; EIN_EXPORT BOOL __stdcall EgtSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool* pbAdjac, double ptP1[3], double ptP2[3], double* pdAng) ; +EIN_EXPORT BOOL __stdcall EgtSurfTmLineInters( int nId, const double ptP[3], const double vtDir[3], int nRefType, + int*& vFlagInters, double*& vParInters, int* pnCount) ; EIN_EXPORT BOOL __stdcall EgtTextNormVersor( int nId, int nRefId, double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtTextGetContent( int nId, wchar_t*& wsText) ; EIN_EXPORT BOOL __stdcall EgtTextGetFont( int nId, wchar_t*& wsFont) ; diff --git a/EXeConst.h b/EXeConst.h index 6c5bd16..0485f58 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -53,6 +53,14 @@ enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD APP_RIGHT_CONVEX_LINES = 12, // come ICurve::APL_RIGHT_CONVEX APP_ARCS = 3} ; +//----------------- Costanti tipo punto intersezione Linea SurfTriMesh --------- +enum SLiType { SLT_NONE = 0, + SLT_IN = 1, + SLT_OUT = 2, + SLT_TG_INI = 3, + SLT_TG_FIN = 4, + SLT_TOUCH = 5} ; + //----------------- Costanti flag import CNC ----------------------------------- enum EicFlag { EIC_FLAG_NONE = 0, // come EImCncFlag::EICFLAG_NONE EIC_FLAG_CHAIN = 1, // come EImCncFlag::EICFLAG_CHAIN diff --git a/EXeExecutor.h b/EXeExecutor.h index 56eb6c2..780a8df 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -549,6 +549,7 @@ EXE_EXPORT bool ExeSurfTmFacetCenter( int nId, int nFacet, int nRefId, Point3d& EXE_EXPORT bool ExeSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSide( int nId, int nFacet, const Vector3d& vtDir, int nRefId, Point3d& ptP1, Point3d& ptP2) ; EXE_EXPORT bool ExeSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool& bAdjac, Point3d& ptP1, Point3d& ptP2, double& dAng) ; +EXE_EXPORT bool ExeSurfTmLineInters( int nId, const Point3d& ptP, const Vector3d& vtDir, int nRefType, INTDBLVECTOR& vInters) ; EXE_EXPORT bool ExeVolZmapVolume( int nId, double& dVol) ; EXE_EXPORT int ExeVolZmapPartCount( int nId) ; EXE_EXPORT bool ExeVolZmapPartVolume( int nId, int nPart, double& dVol) ; diff --git a/EgtNumCollection.h b/EgtNumCollection.h index d21bf46..6dd8722 100644 --- a/EgtNumCollection.h +++ b/EgtNumCollection.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2014 +// EgalTech 2014-2018 //---------------------------------------------------------------------------- -// File : EgtNumCollection.h Data : 02.04.14 Versione : 1.5d1 +// File : EgtNumCollection.h Data : 21.03.18 Versione : 1.9c3 // Contenuto : Raccolte di oggetti numerici semplici. // // @@ -36,3 +36,9 @@ typedef std::list UINT_LIST ; // lista di interi senza seg // Raccolte di double typedef std::vector DBLVECTOR ; // vettore di double typedef std::list DBLLIST ; // lista di double + +//---------------------------------------------------------------------------- +// Raccolte di coppie integer, double +typedef std::pair INTDBL ; // coppia flag, parametro +typedef std::vector INTDBLVECTOR ; // vettore di coppie flag, parametro +typedef std::list INTDBLLIST ; // lista di coppie flag, parametro