switch back to manual projection for OCC geometry (wta/coil.ipynb make a huge difference)

This commit is contained in:
Joachim Schoeberl 2022-10-16 13:08:27 +02:00
parent a005bfadd8
commit bce715acc9
2 changed files with 9 additions and 4 deletions

View File

@ -151,8 +151,12 @@ namespace netgen
{
newp = p1 + secpoint * (p2-p1);
newgi.trignum = gi1.trignum;
/*
newgi.u = 0.5 * (gi1.u + gi1.u);
newgi.v = 0.5 * (gi1.v + gi2.v);
*/
newgi.u = gi1.u + secpoint*(gi2.u - gi1.u);
newgi.v = gi1.v + secpoint*(gi2.v - gi1.v);
if(!ProjectPointGI(newp, newgi))
newgi = Project(newp);
}

View File

@ -148,16 +148,18 @@ namespace netgen
bool OCCFace::ProjectPointGI(Point<3>& p_, PointGeomInfo& gi) const
{
/*
static Timer t("OCCFace::ProjectPointGI");
RegionTimer rt(t);
// *testout << "input, uv = " << gi.u << ", " << gi.v << endl;
auto suval = shape_analysis->NextValueOfUV({gi.u, gi.v}, ng2occ(p_), tolerance);
gi.trignum = nr+1;
suval.Coord(gi.u, gi.v);
// *testout << "result, uv = " << gi.u << ", " << gi.v << endl;
p_ = occ2ng(surface->Value( gi.u, gi.v ));
return true;
*/
// Old code: do newton iterations manually
/*
double u = gi.u;
double v = gi.v;
auto p = ng2occ(p_);
@ -207,7 +209,6 @@ namespace netgen
p_ = occ2ng(x);
return true;
*/
}
Point<3> OCCFace::GetPoint(const PointGeomInfo& gi) const