Compare commits
3 Commits
NewMakeUniform
...
abseil
| Author | SHA1 | Date | |
|---|---|---|---|
| 466f92384b | |||
| 326f85c3d2 | |||
| ccefe1314f |
@@ -117,6 +117,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>C:\EgtDev\Extern\abseil\Include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
||||
+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/absl/algorithm/container.h"
|
||||
#include "/EgtDev/Extern/abseil/Include/absl/container/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
|
||||
|
||||
Reference in New Issue
Block a user