little stl cleanup

This commit is contained in:
Joachim Schöberl 2019-09-24 10:14:52 +02:00
parent 0c4b90c4c4
commit 54fa0d81ec
2 changed files with 5 additions and 31 deletions

View File

@ -691,11 +691,6 @@ void STLChart :: AddOuterTrig(STLTrigId i)
bool STLChart :: IsInWholeChart(int nr) const
{
// for (int i = 1; i <= charttrigs.Size(); i++)
// if (charttrigs.Get(i) == nr) return true;
// for (int i = 1; i <= outertrigs.Size(); i++)
// if (outertrigs.Get(i) == nr) return true;
// return false;
return charttrigs.Contains(nr) || outertrigs.Contains(nr);
}
@ -1014,30 +1009,10 @@ void STLBoundary ::AddTriangle(const STLTriangle & t)
INDEX_2 op(seg[1], seg[0]);
if (boundary_ht.Used(op))
{
// cout << "delete " << op << endl;
boundary_ht.Delete(op);
}
boundary_ht.Delete(op);
else
{
// cout << "insert " << seg << endl;
boundary_ht[seg] = bseg;
}
boundary_ht[seg] = bseg;
}
/*
// cout << "bounds = " << boundary << endl;
cout << "bounds:";
for (auto & val : boundary)
cout << val.I1() << "-" << val.I2() << endl;
cout << "ht = " << boundary_ht << endl;
if (boundary_ht.UsedElements() != boundary.Size())
{
cout << "wrong count" << endl;
char key;
cin >> key;
}
*/
// NgProfiler::StopTimer (timer_new);
}
bool STLBoundary :: TestSeg(const Point<3>& p1, const Point<3> & p2, const Vec<3> & sn,

View File

@ -140,11 +140,10 @@ class STLBoundarySeg
Point<3> p1, p2, center;
Point<2> p2d1, p2d2;
Box<2> boundingbox;
// Point<2> p2dmin, p2dmax;
double rad;
STLPointId i1, i2;
int smoothedge;
bool smoothedge;
public:
STLBoundarySeg () { ; }
STLBoundarySeg (STLPointId ai1, STLPointId ai2, const Array<Point<3>,STLPointId> & points,
@ -177,8 +176,8 @@ public:
const Box<2> & BoundingBox() const { return boundingbox; }
double Radius () const { return rad; }
void SetSmoothEdge (int se) { smoothedge = se; }
int IsSmoothEdge () const { return smoothedge; }
void SetSmoothEdge (bool se) { smoothedge = se; }
bool IsSmoothEdge () const { return smoothedge; }
friend class STLBoundary;
};