From 2745d4107ea85e6a453b472849b9da616b59adb9 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 2 Oct 2019 06:31:14 +0000 Subject: [PATCH] Include : - aggiornamento prototipi. --- EGkIntersTriaTria.h | 22 +++++++++++++++++++--- EGkSurfTriMesh.h | 9 ++++++--- EInAPI.h | 4 ++++ EXeExecutor.h | 5 ++++- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/EGkIntersTriaTria.h b/EGkIntersTriaTria.h index bade7c3..346368e 100644 --- a/EGkIntersTriaTria.h +++ b/EGkIntersTriaTria.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2018-2018 +// EgalTech 2018-2019 //---------------------------------------------------------------------------- -// File : EGkIntersTriaTria.h Data : 27.08.18 Versione : 1.9h3 +// File : EGkIntersTriaTria.h Data : 01.10.19 Versione : 2.1i3 // Contenuto : Dichiarazione della classe intersezione triangolo/triangolo. // // // // Modifiche : 27.08.18 DS Creazione modulo. -// +// 01.10.19 LM Aggiunte costanti // //---------------------------------------------------------------------------- @@ -37,4 +37,20 @@ enum IntTriaTriaType { ITTT_NO = 0, // non c' ITTT_PNT = 3, // l'intersezione è un punto sui lati di entrambi i triangoli (ptInt) ITTT_EDGE = 4, // l'intersezione coincide con un lato di un triangolo (ptInt, ptInt2) ITTT_YES = 5} ; // l'intersezione è un segmento (ptInt, ptInt2) +// Tipi estesi +enum IntTriaTriaSpecialType { ITTTS_NO = 0, // non c'è intersezione + ITTTS_OVERLAPS = 1, // i triangoli si sovrappongono (i triangoli del poligono sono in vTria) + ITTTS_VERT_VERT = 2, // intersezione coppia di vertici + ITTTS_VERT_EDGE = 3, // vertice del primo su lato del secondo + ITTTS_VERT_INT = 4, // vertice del primo nell'interno del secondo + ITTTS_EDGE_VERT = 5, // vertice del secondo su lato del primo + ITTTS_EDGE_EDGE_PNT = 6, // punto sull'intersezione di due lati + ITTTS_INT_VERT = 7, // vertice del secondo nell'interno del primo + ITTTS_EDGE_EDGE_SEG = 8, // sovrapposizione di lati + ITTTS_EDGE_INT = 9, // lato del primo nell'interno del secondo + ITTTS_INT_EDGE = 10, // lato del secondo nell'interno del primo + ITTTS_INT_INT_SEG = 11 // segmento all'interno di entrambi i triangoli + } ; +// Conversione dai nuovi ai vecchi tipi +const int nFromSpecialToNormal[] = { ITTT_NO, ITTT_OVERLAPS, ITTT_VERT, ITTT_VERT, ITTT_VERT, ITTT_VERT, ITTT_PNT, ITTT_VERT, ITTT_EDGE, ITTT_EDGE, ITTT_EDGE, ITTT_YES } ; \ No newline at end of file diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index e202b4e..22b6a59 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -95,9 +95,12 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool GetFacetBBox( int nF, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ; virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; virtual bool GeneralizedCut( const ICurve& cvCurve, bool bSaveOnEq) = 0 ; - virtual bool GetAllTriaOverlapBox( const BBox3d& b3Box, INTVECTOR& vT) const = 0 ; - virtual const BBox3d& GetAllTriaBox( void) const = 0 ; - virtual int GetPartCount( void) const = 0 ; + virtual bool Add( const ISurfTriMesh& Other) = 0 ; + virtual bool Intersect( const ISurfTriMesh& Other) = 0 ; + virtual bool Subtract( const ISurfTriMesh& Other) = 0 ; + virtual bool GetAllTriaOverlapBox( const BBox3d& b3Box, INTVECTOR& vT) const ; + virtual const BBox3d& GetAllTriaBox( void) const ; + virtual int GetPartCount( void) const = 0 ; virtual bool RemovePart( int nPart) = 0 ; virtual ISurfTriMesh* ClonePart( int nPart) const = 0 ; } ; diff --git a/EInAPI.h b/EInAPI.h index fc67dd6..bb2a7c5 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -444,8 +444,12 @@ EIN_EXPORT BOOL __stdcall EgtSurfFrIntersect( int nId1, int nId2) ; EIN_EXPORT BOOL __stdcall EgtSurfFrOffset( int nId, double dDist, int nType) ; EIN_EXPORT int __stdcall EgtExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtGetSurfTmSilhouette( int nId, const double vtDir[3], int nDestGrpId, int nRefType, int* pnCount) ; +EIN_EXPORT int __stdcall EgtExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; +EIN_EXPORT BOOL __stdcall EgtSurfTmAdd( int nId1, int nId2) ; +EIN_EXPORT BOOL __stdcall EgtSurfTmSubtract( int nId1, int nId2) ; +EIN_EXPORT BOOL __stdcall EgtSurfTmIntersect( int nId1, int nId2) ; // Geo Snap Vector/Point/Frame EIN_EXPORT BOOL __stdcall EgtStartPoint( int nId, int nRefId, double ptP[3]) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 850295c..ed32950 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -496,9 +496,12 @@ EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; 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 int ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2) ; +EXE_EXPORT bool ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2) ; EXE_EXPORT bool ExeCutSurfTmPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ; EXE_EXPORT bool ExeCutSurfTmClosedCurve( int nSurfId, int nCurveId, bool bSaveOnEq) ; +EXE_EXPORT bool ExeSurfTmAdd( int nId1, int nId2) ; +EXE_EXPORT bool ExeSurfTmSubtract( int nId1, int nId2) ; +EXE_EXPORT bool ExeSurfTmIntersect( int nId1, int nId2) ; // GeomDb Volume Modify EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ;