EgtGeomKernel :
- aggiunta libreria abseil.
This commit is contained in:
+14
-2
@@ -41,6 +41,7 @@
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkIntervals.h"
|
||||
#include "/EgtDev/Extern/Eigen/Dense"
|
||||
#include "/EgtDev/Include/EgtPerfCounter.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -1797,13 +1798,18 @@ SurfBezier::GetApproxSurf( double dTol, double dSideMin) const
|
||||
// resetto il vettore degli edge
|
||||
m_mCCEdge.clear() ;
|
||||
m_vCCLoop.clear() ;
|
||||
//debug
|
||||
static PerformanceCounter Counter;
|
||||
static double dTotCount = 0. ;
|
||||
Counter.Start();
|
||||
//debug
|
||||
for ( int i = 0 ; i < (int) vTrees.size() ; ++ i) {
|
||||
Point3d ptMin = get<0>( vTrees[i]) ;
|
||||
Point3d ptMax = get<1>( vTrees[i]) ;
|
||||
Tree.SetSurf( this, ptMin, ptMax) ;
|
||||
Tree.BuildTree( dTol, dSideMin) ;
|
||||
if ( ! Tree.GetPolygons( vvPL, vvPL3d, m_mCCEdge, m_vCCLoop))
|
||||
continue ;
|
||||
if ( ! Tree.GetPolygons(vvPL, vvPL3d, m_mCCEdge, m_vCCLoop))
|
||||
continue ;
|
||||
//Tree.GetPolygonsBasic( vPL, true) ; // per usare i polygon basic
|
||||
|
||||
// aggiorno la chiusura della superficie
|
||||
@@ -1813,6 +1819,12 @@ SurfBezier::GetApproxSurf( double dTol, double dSideMin) const
|
||||
// UpdateEdgesFromTree( Tree) ; // ora viene fatto nella GetPolygons
|
||||
}
|
||||
|
||||
//debug
|
||||
dTotCount += Counter.Stop() ;
|
||||
string sOut = "CalcTree=" + ToString( dTotCount, 3) ;
|
||||
LOG_INFO( GetEGkLogger(), sOut.c_str())
|
||||
//debug
|
||||
|
||||
//// per usare i polygon basic//////////////////////
|
||||
//for (int k = 0 ; k < (int)vPL.size(); ++k) {
|
||||
// vvPL.emplace_back() ;
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "/EgtDev/Include/EGkPolyLine.h"
|
||||
#include "/EgtDev/Include/EGkChainCurves.h"
|
||||
#include <map>
|
||||
#include "/EgtDev/Extern/abseil/Include/container.h"
|
||||
#include "/EgtDev/Extern/abseil/Include/flat_hash_map.h"
|
||||
#include <utility>
|
||||
|
||||
struct PairHashInt64 {
|
||||
@@ -312,7 +314,7 @@ class Tree
|
||||
private :
|
||||
const SurfBezier* m_pSrfBz ; // superficie di bezier
|
||||
bool m_bTrimmed ; // superficie trimmata
|
||||
std::unordered_map<int,int> m_mChunk ; // mappa in cui vengono salvati chunk di appartenza per ogni loop di trim
|
||||
absl::flat_hash_map<int,int> m_mChunk ; // mappa in cui vengono salvati chunk di appartenza per ogni loop di trim
|
||||
std::vector<std::tuple<PolyLine,bool>> m_vPlApprox ; // vettore contenente le approssimazioni dei loop // il bool indica se la curva è CCW
|
||||
bool m_bBilinear ; // superficie bilineare
|
||||
bool m_bMulti ; // superficie multi-patch
|
||||
@@ -323,8 +325,8 @@ class Tree
|
||||
int m_nDegV ; // grado della superficie nel parametro V
|
||||
int m_nSpanU ; // numero di span lungo il parametro U
|
||||
int m_nSpanV ; // numero di span lungo il parametro V
|
||||
std::unordered_map<int,Cell> m_mTree ; // mappa che contiene tutti i nodi e le foglie dell'albero. -2 è puntatore Null e -1 è root
|
||||
mutable std::unordered_map<std::pair<int64_t,int64_t>,Point3d,PairHashInt64> m_mPt3d ; // mappa che contiene tutti i punti 3d della superficie calcolati (la chiave sono le coordinate, moltiplicate per 2^24 e trasformate in int)
|
||||
absl::flat_hash_map<int,Cell> m_mTree ; // mappa che contiene tutti i nodi e le foglie dell'albero. -2 è puntatore Null e -1 è root
|
||||
mutable absl::flat_hash_map<std::pair<int64_t,int64_t>,Point3d,PairHashInt64> m_mPt3d ; // mappa che contiene tutti i punti 3d della superficie calcolati (la chiave sono le coordinate, moltiplicate per 2^24 e trasformate in int)
|
||||
INTVECTOR m_vnLeaves ; // vettore delle foglie
|
||||
INTVECTOR m_vnParents ; // vettore delle celle ottenute dalla divisione preliminare in singole patch
|
||||
ICRVCOMPOPOVECTOR m_vCCLoop2D ; // vettore che contiene le CurveCompo che rappresentano i loop di trim tenendo conto della divisione in celle
|
||||
|
||||
+1
-1
@@ -2436,7 +2436,7 @@ VolZmap::MillingGeneralMotionStep( const Point3d& ptPs, const Vector3d& vtDs, co
|
||||
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe)
|
||||
{
|
||||
// Flag per impostare vecchia (approssimativa) o nuova modalità di calcolo
|
||||
constexpr bool OLD_LINEAR = true ;
|
||||
constexpr bool OLD_LINEAR = false ;
|
||||
|
||||
// Deve essere definito l'utensile corrente
|
||||
if ( m_nCurrTool < 0 || m_nCurrTool >= int( m_vTool.size()))
|
||||
|
||||
Reference in New Issue
Block a user