mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
use boundary_ht, remove unsued functions
This commit is contained in:
parent
b45d022542
commit
279a5a2faa
@ -850,6 +850,7 @@ STLBoundary :: STLBoundary (STLGeometry * ageometry)
|
|||||||
{ ; }
|
{ ; }
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
void STLBoundary :: AddOrDelSegment(const STLBoundarySeg & seg)
|
void STLBoundary :: AddOrDelSegment(const STLBoundarySeg & seg)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@ -867,6 +868,7 @@ void STLBoundary :: AddOrDelSegment(const STLBoundarySeg & seg)
|
|||||||
boundary.SetSize(boundary.Size()-1);
|
boundary.SetSize(boundary.Size()-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void STLBoundary ::AddTriangle(const STLTriangle & t)
|
void STLBoundary ::AddTriangle(const STLTriangle & t)
|
||||||
{
|
{
|
||||||
@ -1106,11 +1108,14 @@ bool STLBoundary :: TestSeg(const Point<3>& p1, const Point<3> & p2, const Vec<3
|
|||||||
Point<3> c = Center (p1, p2);
|
Point<3> c = Center (p1, p2);
|
||||||
double dist1 = Dist (c, p1);
|
double dist1 = Dist (c, p1);
|
||||||
|
|
||||||
|
/*
|
||||||
int nseg = NOSegments();
|
int nseg = NOSegments();
|
||||||
for (j = 1; j <= nseg; j++)
|
for (j = 1; j <= nseg; j++)
|
||||||
{
|
{
|
||||||
const STLBoundarySeg & seg = GetSegment(j);
|
const STLBoundarySeg & seg = GetSegment(j);
|
||||||
|
*/
|
||||||
|
for(auto [i2, seg] : boundary_ht)
|
||||||
|
{
|
||||||
|
|
||||||
if (seg.IsSmoothEdge())
|
if (seg.IsSmoothEdge())
|
||||||
continue;
|
continue;
|
||||||
|
@ -187,23 +187,23 @@ class STLBoundary
|
|||||||
private:
|
private:
|
||||||
STLGeometry * geometry;
|
STLGeometry * geometry;
|
||||||
const STLChart * chart;
|
const STLChart * chart;
|
||||||
NgArray<STLBoundarySeg> boundary;
|
// NgArray<STLBoundarySeg> boundary;
|
||||||
ClosedHashTable<INDEX_2, STLBoundarySeg> boundary_ht;
|
ClosedHashTable<INDEX_2, STLBoundarySeg> boundary_ht;
|
||||||
BoxTree<2,INDEX_2> * searchtree = nullptr;
|
BoxTree<2,INDEX_2> * searchtree = nullptr;
|
||||||
public:
|
public:
|
||||||
STLBoundary(STLGeometry * ageometry);
|
STLBoundary(STLGeometry * ageometry);
|
||||||
~STLBoundary() { delete searchtree; }
|
~STLBoundary() { delete searchtree; }
|
||||||
|
|
||||||
void Clear() {boundary.SetSize(0); boundary_ht = ClosedHashTable<INDEX_2,STLBoundarySeg>(); }
|
void Clear() { /* boundary.SetSize(0); */ boundary_ht = ClosedHashTable<INDEX_2,STLBoundarySeg>(); }
|
||||||
void SetChart (const STLChart * achart) { chart = achart; }
|
void SetChart (const STLChart * achart) { chart = achart; }
|
||||||
//don't check, if already exists!
|
//don't check, if already exists!
|
||||||
void AddNewSegment(const STLBoundarySeg & seg) {boundary.Append(seg);};
|
// void AddNewSegment(const STLBoundarySeg & seg) {boundary.Append(seg);};
|
||||||
//check if segment exists
|
//check if segment exists
|
||||||
void AddOrDelSegment(const STLBoundarySeg & seg);
|
// void AddOrDelSegment(const STLBoundarySeg & seg);
|
||||||
//addordelsegment for all 3 triangle segments!
|
//addordelsegment for all 3 triangle segments!
|
||||||
void AddTriangle(const STLTriangle & t);
|
void AddTriangle(const STLTriangle & t);
|
||||||
int NOSegments() {return boundary.Size();};
|
int NOSegments() {return boundary_ht.UsedElements();};
|
||||||
const STLBoundarySeg & GetSegment(int i) {return boundary.Get(i);}
|
// const STLBoundarySeg & GetSegment(int i) {return boundary.Get(i);}
|
||||||
|
|
||||||
void BuildSearchTree();
|
void BuildSearchTree();
|
||||||
void DeleteSearchTree();
|
void DeleteSearchTree();
|
||||||
|
Loading…
Reference in New Issue
Block a user