add unintentionally removed part again

This commit is contained in:
Christopher Lackner 2022-08-09 18:06:11 +02:00
parent 9130daa0b9
commit 35337e083c
2 changed files with 39 additions and 1 deletions

View File

@ -183,6 +183,45 @@ static void STLFindEdges (STLGeometry & geom, Mesh & mesh,
seg2[0] = p2 + PointIndex::BASE-1;; seg2[0] = p2 + PointIndex::BASE-1;;
seg2[1] = p1 + PointIndex::BASE-1;; seg2[1] = p1 + PointIndex::BASE-1;;
seg2.si = geom.GetTriangle(trig2).GetFaceNum(); seg2.si = geom.GetTriangle(trig2).GetFaceNum();
seg2.edgenr = i;
seg2.epgeominfo[0].edgenr = i;
seg2.epgeominfo[0].dist = line->GetDist(j+1);
seg2.epgeominfo[1].edgenr = i;
seg2.epgeominfo[1].dist = line->GetDist(j);
/*
(*testout) << "seg = "
<< "edgenr " << seg2.epgeominfo[0].edgenr
<< " dist " << seg2.epgeominfo[0].dist
<< " edgenr " << seg2.epgeominfo[1].edgenr
<< " dist " << seg2.epgeominfo[1].dist << endl;
*/
seg2.geominfo[0].trignum = trig2b;
seg2.geominfo[1].trignum = trig2;
/*
geom.SelectChartOfTriangle (trig2);
hp = hp2 = mesh.Point (seg[0]);
seg2.geominfo[0].trignum = geom.Project (hp);
(*testout) << "hp = " << hp2 << ", hp proj = " << hp << ", trignum = " << seg.geominfo[0].trignum << endl;
if (Dist (hp, hp2) > 1e-5 || seg2.geominfo[0].trignum == 0)
{
(*testout) << "Get GeomInfo PROBLEM" << endl;
}
geom.SelectChartOfTriangle (trig2b);
hp = hp2 = mesh.Point (seg[1]);
seg2.geominfo[1].trignum = geom.Project (hp);
(*testout) << "hp = " << hp2 << ", hp proj = " << hp << ", trignum = " << seg.geominfo[1].trignum << endl;
if (Dist (hp, hp2) > 1e-5 || seg2.geominfo[1].trignum == 0)
{
(*testout) << "Get GeomInfo PROBLEM" << endl;
}
*/
mesh.AddSegment (seg2); mesh.AddSegment (seg2);
} }
} }

View File

@ -123,7 +123,6 @@ public:
STLTriangle () STLTriangle ()
{ {
pts[0]=0;pts[1]=0;pts[2]=0; pts[0]=0;pts[1]=0;pts[2]=0;
topedges[0] = topedges[1] = topedges[2] = 0.;
nbtrigs[0][0] = nbtrigs[0][1] = nbtrigs[0][2] = 0.; nbtrigs[0][0] = nbtrigs[0][1] = nbtrigs[0][2] = 0.;
nbtrigs[1][0] = nbtrigs[1][1] = nbtrigs[1][2] = 0.; nbtrigs[1][0] = nbtrigs[1][1] = nbtrigs[1][2] = 0.;
} }