Merge branch 'master' into 3dm_import
This commit is contained in:
+1
-3
@@ -16,7 +16,6 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkPointGrid3d.h"
|
||||
#include "/EgtDev/Include/EGkGeoCollection.h"
|
||||
#include <unordered_set>
|
||||
|
||||
class IGeomDB ;
|
||||
|
||||
@@ -59,7 +58,6 @@ class ChainCurves
|
||||
EGK_EXPORT bool GetForkIds( INTVECTOR& vForkIds) ;
|
||||
|
||||
private :
|
||||
typedef std::unordered_set<int> INTUSET ;
|
||||
struct CrvData {
|
||||
int nId ;
|
||||
Point3d ptStart ;
|
||||
@@ -92,7 +90,7 @@ class ChainCurves
|
||||
private :
|
||||
bool m_bAllowInvert ;
|
||||
double m_dToler ;
|
||||
INTUSET m_sCrvId ;
|
||||
INTUNORDSET m_sCrvId ;
|
||||
CRVDATAVECTOR m_vCrvData ;
|
||||
PointGrid3d m_PointGrid ;
|
||||
bool m_bFromNear ;
|
||||
|
||||
+6
-5
@@ -1,13 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCurveByApprox.h Data : 23.07.15 Versione : 1.6g7
|
||||
// File : EGkCurveByApprox.h Data : 28.07.23 Versione : 2.5g3
|
||||
// Contenuto : Dichiarazione della classe CurveByApprox.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 23.07.15 DS Creazione modulo.
|
||||
//
|
||||
// 28.07.23 DS GetArcs e GetArcsCorner.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -35,10 +35,11 @@ class CurveByApprox
|
||||
EGK_EXPORT bool Reset( void) ;
|
||||
EGK_EXPORT bool AddPoint( const Point3d& ptP) ;
|
||||
EGK_EXPORT ICurve* GetCurve( int nType, double dLinTol, double dAngTolDeg, double dLinFea) ;
|
||||
EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
|
||||
EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) ;
|
||||
EGK_EXPORT bool GetArcsCorner( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
|
||||
|
||||
public :
|
||||
enum TYPE { ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ;
|
||||
enum TYPE { ARCS = 0, ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ;
|
||||
|
||||
private :
|
||||
bool CalcParameterization( void) ;
|
||||
|
||||
@@ -84,6 +84,31 @@ inline ICurveComposite* GetCurveComposite( IGeoObj* pGObj)
|
||||
{ if ( pGObj == nullptr || pGObj->GetType() != CRV_COMPO)
|
||||
return nullptr ;
|
||||
return (static_cast<ICurveComposite*>(pGObj)) ; }
|
||||
inline ICurveComposite* ConvertCurveToComposite( IGeoObj* pGObj)
|
||||
{ if ( pGObj == nullptr || ( pGObj->GetType() & GEO_CURVE) == 0) {
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
}
|
||||
ICurveComposite* pCrvCo = CreateCurveComposite() ;
|
||||
if ( pCrvCo == nullptr) {
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
}
|
||||
ICurve* pCrv = static_cast<ICurve*>( pGObj) ;
|
||||
Vector3d vtExtr ;
|
||||
if ( pCrv->GetExtrusion( vtExtr) && ! vtExtr.IsSmall())
|
||||
pCrvCo->SetExtrusion( vtExtr) ;
|
||||
double dThick ;
|
||||
if ( pCrv->GetThickness( dThick) && abs( dThick) > EPS_SMALL)
|
||||
pCrvCo->SetThickness( dThick) ;
|
||||
for ( int i = 0 ; i < 2 ; ++ i) {
|
||||
int nProp = pCrv->GetTempProp( i) ;
|
||||
if ( nProp != 0)
|
||||
pCrvCo->SetTempProp( nProp, i) ;
|
||||
}
|
||||
pCrvCo->AddCurve( pCrv) ;
|
||||
return pCrvCo ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di puntatori a ICurveComposite
|
||||
|
||||
+15
-3
@@ -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) ;
|
||||
|
||||
+11
-2
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2014
|
||||
// EgalTech 2013-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkFrame3d.h Data : 30.05.14 Versione : 1.5e10
|
||||
// File : EGkFrame3d.h Data : 20.07.23 Versione : 2.5g2
|
||||
// Contenuto : Dichiarazione della classe Reference Frame 3d.
|
||||
//
|
||||
//
|
||||
@@ -167,3 +167,12 @@ AreSameFrame( const Frame3d& frRef1, const Frame3d& frRef2)
|
||||
return false ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica se il riferimento coincide con quello globale (o identità)
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
IsGlobFrame( const Frame3d& frRef)
|
||||
{
|
||||
return AreSameFrame( frRef, GLOB_FRM) ;
|
||||
}
|
||||
|
||||
+5
-1
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkGdbIterator.h Data : 29.01.23 Versione : 2.5a2
|
||||
// File : EGkGdbIterator.h Data : 09.07.23 Versione : 2.5g1
|
||||
// Contenuto : Dichiarazione della interfaccia IGdbIterator.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 04.12.13 DS Creazione modulo.
|
||||
// 29.01.23 DS Aggiunte GetAllInfo e CopyAllInfoFrom.
|
||||
// 09.07.23 DS Aggiunte SetStipple e GetStipple.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -144,6 +145,9 @@ class __declspec( novtable) IGdbIterator
|
||||
virtual bool RemoveInfo( const std::string& sKey) = 0 ;
|
||||
virtual bool GetAllInfo( STRVECTOR& vsInfo) const = 0 ;
|
||||
virtual bool CopyAllInfoFrom( const IGdbIterator& iIter) = 0 ;
|
||||
// Stipple
|
||||
virtual bool SetStipple( int nFactor, int nPattern) = 0 ;
|
||||
virtual bool GetStipple( int& nFactor, int& nPattern) const = 0 ;
|
||||
// TextureData
|
||||
virtual bool SetTextureName( const std::string& sTxrName) = 0 ;
|
||||
virtual bool SetTextureFrame( const Frame3d& frTxrRef) = 0 ;
|
||||
|
||||
+6
-1
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkGeomDB.h Data : 29.01.23 Versione : 2.5a
|
||||
// File : EGkGeomDB.h Data : 09.07.23 Versione : 2.5g1
|
||||
// Contenuto : Dichiarazione della interfaccia IGeomDB.
|
||||
//
|
||||
//
|
||||
@@ -12,6 +12,7 @@
|
||||
// 30.05.14 DS Agg. metodi di Shear.
|
||||
// 03.12.14 DS Aggiunta gestione riferimento di griglia.
|
||||
// 29.01.23 DS Aggiunta GetAllInfo.
|
||||
// 09.07.23 DS Aggiunte DumpStipple, SetStipple e GetStipple.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -179,6 +180,10 @@ class __declspec( novtable) IGeomDB
|
||||
virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ;
|
||||
virtual bool GetAllInfo( int nId, STRVECTOR& vsInfo) const = 0 ;
|
||||
virtual bool CopyAllInfoFrom( int nId, int nSouId) = 0 ;
|
||||
// Stipple (significativo solo per curve)
|
||||
virtual bool DumpStipple( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool SetStipple( int nId, int nFactor, int nPattern) = 0 ;
|
||||
virtual bool GetStipple( int nId, int& nFactor, int& nPattern) const = 0 ;
|
||||
// TextureData
|
||||
virtual bool DumpTextureData( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
|
||||
virtual bool SetTextureName( int nId, const std::string& sTxrName) = 0 ;
|
||||
|
||||
+4
-2
@@ -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 ;
|
||||
|
||||
+4
-4
@@ -196,11 +196,11 @@ EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline const std::string
|
||||
ToString( int nVal, int nPrec = 1)
|
||||
ToString( int nVal, int nPrec = 1, int nRadix = 10)
|
||||
{
|
||||
// eseguo conversione
|
||||
char szBuff[24] ;
|
||||
int nErr = _itoa_s( nVal, szBuff, 10) ;
|
||||
int nErr = _itoa_s( nVal, szBuff, nRadix) ;
|
||||
// se errore, ritorno stringa opportuna
|
||||
if ( nErr != 0) {
|
||||
_ASSERT( 0) ;
|
||||
@@ -216,11 +216,11 @@ ToString( int nVal, int nPrec = 1)
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( unsigned int nVal, int nPrec = 1)
|
||||
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10)
|
||||
{
|
||||
// eseguo conversione
|
||||
char szBuff[24] ;
|
||||
int nErr = _ui64toa_s( nVal, szBuff, 24, 10) ;
|
||||
int nErr = _ultoa_s( nVal, szBuff, nRadix) ;
|
||||
// se errore, ritorno stringa opportuna
|
||||
if ( nErr != 0) {
|
||||
_ASSERT( 0) ;
|
||||
|
||||
+6
-1
@@ -591,6 +591,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) ;
|
||||
@@ -676,8 +677,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,
|
||||
@@ -696,6 +700,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) ;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const int KEY_BASELIB_PROD = 207 ;
|
||||
const int KEY_BASELIB_VER = 2506 ;
|
||||
const int KEY_BASELIB_VER = 2508 ;
|
||||
const int KEY_BASELIB_LEV = 1 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user