Include :

- EGkIntersCurveCurve.h rinominata in EGkIntersCurves.h
- aggiornamenti vari.
This commit is contained in:
Dario Sassi
2015-07-07 18:34:39 +00:00
parent 8353d15efc
commit cb0cf8592f
3 changed files with 40 additions and 4 deletions
+1
View File
@@ -79,6 +79,7 @@ class __declspec( novtable) IGeomDB
virtual bool Relocate( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) = 0 ;
virtual bool RelocateGlob( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) = 0 ;
virtual bool GroupSwap( int nId1, int nId2, bool bSwapRef, bool bMark = false) = 0 ;
virtual int GetNewId( void) const = 0 ;
virtual bool ChangeId( int nId, int nNewId) = 0 ;
virtual bool Erase( int nId) = 0 ;
virtual bool EmptyGroup( int nId) = 0 ;
+36 -4
View File
@@ -1,13 +1,14 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2014
// EgalTech 2014-2015
//----------------------------------------------------------------------------
// File : EGkIntersCurveCurve.h Data : 20.06.14 Versione : 1.5f6
// File : EGkIntersCurves.h Data : 06.07.15 Versione : 1.6g2
// Contenuto : Dichiarazione della classe intersezione curva/curva.
//
//
//
// Modifiche : 20.06.14 DS Creazione modulo.
//
// 06.07.15 DS Aggiunta dichiarazione classe SelfIntersCurve e
// cambiato nome da EGkIntersCurveCurve a EGkIntersCurves.
//
//----------------------------------------------------------------------------
@@ -25,7 +26,6 @@
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
//! dati di intersezione relativi ad una curva
struct IntCrvInfo {
@@ -136,3 +136,35 @@ class IntersCurveCurve
PtrOwner<ICurve> m_pTmpCrv[2] ; // eventuale esplosione temporanea delle curve
} ;
//-----------------------------------------------------------------------------
//! Classe per calcolo auto-intersezioni di una curva nel piano XY locale
class SelfIntersCurve
{
public :
//! Le intersezioni sono calcolate nel piano XY locale.<br>
EGK_EXPORT SelfIntersCurve( const ICurve& Curve) ;
public :
//! Indica la presenza di intersezioni con sovrapposizioni
EGK_EXPORT bool GetOverlaps( void) ;
//! Restituisce il numero di auto-intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno)
EGK_EXPORT int GetNumInters( void) ;
//! Restituisce informazioni sull'auto-intersezione di indice nInd ( 0 based)
EGK_EXPORT bool GetIntCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ;
//! Restituisce il punto di auto-intersezione più vicino al punto passato
EGK_EXPORT bool GetIntersPointNearTo( const Point3d& ptNear, Point3d& ptI) ;
private :
SelfIntersCurve( void) ;
bool IsArcToApprox( const ICurve& Curve) ;
void CrvCompoCrvCompoCalculate( const ICurve& CurveA, const ICurve& CurveB) ;
bool SwapInfoAB( ICCIVECTOR& Info, int IndCrvOrd) ;
private :
bool m_bOverlaps ;
int m_nNumInters ;
ICCIVECTOR m_Info ;
const ICurve* m_pOriCrv ; // puntatore alla curva originale
const ICurve* m_pCurve ; // puntatore alla curva usata nei calcoli (originale o temporanea)
PtrOwner<ICurve> m_pTmpCrv ; // eventuale esplosione temporanea della curva
} ;
+3
View File
@@ -231,6 +231,7 @@ EXE_EXPORT int ExeCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
EXE_EXPORT int ExeCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
EXE_EXPORT bool ExeRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
EXE_EXPORT bool ExeRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
EXE_EXPORT int ExeGetNewId( void) ;
EXE_EXPORT bool ExeChangeId( int nId, int nNewId) ;
EXE_EXPORT bool ExeErase( const INTVECTOR& vIds) ;
EXE_EXPORT bool ExeEmptyGroup( int nId) ;
@@ -315,6 +316,7 @@ EXE_EXPORT bool ExeExtendCurveEndByLen( int nId, double dLen) ;
EXE_EXPORT bool ExeTrimExtendCurveByLen( int nId, double dLen, const Point3d& ptNear, int nRefType) ;
EXE_EXPORT int ExeSplitCurve( int nId, int nParts) ;
EXE_EXPORT int ExeSplitCurveAtPoint( int nId, const Point3d& ptOn, int nRefType) ;
EXE_EXPORT int ExeSplitCurveAtSelfInters( int nId, int* pnCount) ;
EXE_EXPORT bool ExeModifyCurveCircleCPN( int nId, const Point3d& ptOn, int nRefType) ;
EXE_EXPORT bool ExeModifyCurveArcRadius( int nId, double dRad) ;
EXE_EXPORT bool ExeModifyCurveArcC2PN( int nId, const Point3d& ptEnd, int nRefType) ;
@@ -348,6 +350,7 @@ EXE_EXPORT bool ExeCurveLengthAtPoint( int nId, const Point3d& ptOn, double dExt
EXE_EXPORT bool ExeCurveNearestExtremityToPoint( int nId, const Point3d& ptP, bool& bStart) ;
EXE_EXPORT bool ExeCurveExtrusion( int nId, int nRefId, Vector3d& vtExtr) ;
EXE_EXPORT bool ExeCurveThickness( int nId, double* pdThick) ;
EXE_EXPORT bool ExeCurveSelfIntersNbr( int nId, int* pnCount) ;
EXE_EXPORT bool ExeGetMinDistPointCurve( const Point3d& ptP, int nId, double* pdDist, double* pdU) ;
EXE_EXPORT bool ExeGetMinDistPntSidePointCurve( const Point3d& ptP, int nId, const Vector3d& vtN,
double* pdDist, Point3d& ptMin, int* pnSide) ;