EgtGeomKernel :

- aggiustati dei bug
- implementati gli strumenti per la gestione delle celle non intersecate
Da aggiungere :
- categorizzazione celle rispetto ai loop.
This commit is contained in:
Daniele Bariletti
2023-06-01 15:32:05 +02:00
parent 4704554728
commit 56d80f5bdd
2 changed files with 851 additions and 169 deletions
+839 -166
View File
File diff suppressed because it is too large Load Diff
+12 -3
View File
@@ -24,6 +24,7 @@ struct Inters {
PNTVECTOR vpt ;
int nOut ;
bool bCCW ;
bool bVertex ;
int nChunk ;
// riordino le intersezioni per lato in senso antiorario dal top
// se ho più intersezioni che entrano in un lato le riordino considerando che percorro i lati in senso antiorario a partire da ptTR
@@ -115,14 +116,22 @@ private :
void GetRightNeigh( int nId, INTVECTOR& vRightNeighs) const ; // restituisce le celle foglie che sono adiacenti al lato right
void GetRootNeigh( int nEdge, INTVECTOR& vNeigh) ; // restituisce le foglie dell'albero che sono adiacenti al lato nEdge, numerato a partire dal top ( 0) in senso antiorario
void ResetTree ( void) ; // resetto m_bProcessed a false per tutti i nodi dell'albero
int FindCell ( const Point3d& ptToAssign) const ; // dato un punto, trova la cella foglia a cui appartiene
INTVECTOR FindCell ( const Point3d& ptToAssign, CurveLine& cl) const ; // dato un punto, trova la cella foglia a cui appartiene
INTVECTOR FindCell ( const Point3d& ptToAssign, CurveLine& cl, INTVECTOR vCells) const ; // dato un punto, trova la cella foglia a cui appartiene
bool TraceLoopLabelCell( void) ; // tracing dei loop e labelling delle celle
bool FindInters( int& nId, CurveLine& clTrim, PNTVECTOR& vptInters) ; // trova le intersezioni tra una cella e una linea di trim
bool FindInters( int& nId, CurveLine& clTrim, PNTVECTOR& vptInters, bool& bVertex) ; // trova le intersezioni tra una cella e una linea di trim
// resituisce l'id della cella verso cui la curva di trim esce e il vettore delle intersezioni per la cella successiva con il primo punto
bool CreateCellPolygons ( int nLeafId, std::vector<POLYLINEVECTOR>& vPolygons, INTVECTOR& vToCheck, int& nPoly, INTVECTOR& vnParentChunk) ;
bool CreateCellPolygons ( int nLeafId, std::vector<POLYLINEVECTOR>& vPolygons, INTVECTOR& vToCheck, int& nPoly, INTVECTOR& vnParentChunk, PolyLine plCell) ;
bool CreateIslandAndHoles ( int nLeafId, std::vector<POLYLINEVECTOR>& vPolygons, int& nPoly, INTVECTOR& vnParentChunk) ;
bool CheckIfBefore( PolyLine& pl, int nEdge) const ;
bool CheckIfBefore( Inters& inA) const ;
bool CheckIfBefore( int& nEdge1, Point3d& ptP1, int& nEdge2, Point3d& ptP2) const ;
bool CheckIfAfter( PolyLine& pl, Point3d& ptNextStart, int nEdge) const ;
bool AreSameEdge( int nEdge1, int nEdge2) const ;
bool AddVertex( int nId, std::vector<PNTVECTOR>& vEdgeVertex, PolyLine& plTrimmedPoly, int& c, Point3d& ptToAdd) const ;
//bool SetRightEdgeIn( int nId, std::vector<PNTVECTOR>& vEdgeVertex, PolyLine& plTrimmedPoly) ;
bool SetRightEdgeIn( int nId) ;
bool CategorizeCell( int& nId) ;
private :
const SurfBezier* m_pSrfBz ; // superficie di bezier