Automatically select correct chart in MeshOptimizeSTLSurface::GetNormalVector

This commit is contained in:
Matthias Hochsteger 2019-10-08 12:34:15 +02:00
parent cedc0657a3
commit d4b376024a
2 changed files with 9 additions and 1 deletions

View File

@ -1108,8 +1108,15 @@ int MeshOptimizeSTLSurface :: CalcPointGeomInfo(PointGeomInfo& gi, const Point<
}
void MeshOptimizeSTLSurface :: GetNormalVector(INDEX surfind, const Point<3> & p, PointGeomInfo & gi, Vec<3> & n) const;
{
throw Exception("MeshOptimizeSTLSurface :: GetNormalVector without PointGeomInfo called");
}
void MeshOptimizeSTLSurface :: GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const
{
geom.SelectChartOfTriangle (gi.trignum)
n = geom.GetChartNormalVector();
}

View File

@ -85,7 +85,8 @@ public:
///
virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point<3> & p3) const;
///
virtual void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const;
void GetNormalVector(INDEX surfind, const Point<3> & p, Vec<3> & n) const override;
void GetNormalVector(INDEX surfind, const Point<3> & p, PointGeomInfo & gi, Vec<3> & n) const override;
};