STLGeometry::GetNormal only valid with PointGeomInfo

This commit is contained in:
Matthias Hochsteger 2019-10-03 11:26:08 +02:00
parent c24e00f6d4
commit 4d98a6eb8c
2 changed files with 7 additions and 1 deletions

View File

@ -102,7 +102,12 @@ int STLGeometry :: GenerateMesh (shared_ptr<Mesh> & mesh, MeshingParameters & mp
Vec<3> STLGeometry :: GetNormal(INDEX surfind, const Point<3> & p) const
{
return GetChartNormalVector();
throw Exception("STLGeometry::GetNormal without PointGeomInfo called");
}
Vec<3> STLGeometry :: GetNormal(int surfind, const Point<3> & p, const PointGeomInfo & gi) const
{
return GetChart(GetChartNr(gi.trignum)).GetNormal();
}
bool STLGeometry :: CalcPointGeomInfo(int /*surfind*/, PointGeomInfo& gi, const Point<3> & p3) const

View File

@ -196,6 +196,7 @@ namespace netgen
void ProjectPoint(INDEX surfind, Point<3> & p) const override;
bool ProjectPointGI (int surfind, Point<3> & p, PointGeomInfo & gi) const override;
Vec<3> GetNormal(int surfind, const Point<3> & p) const override;
Vec<3> GetNormal(int surfind, const Point<3> & p, const PointGeomInfo & gi) const override;
void PointBetween(const Point<3> & p1, const Point<3> & p2,
double secpoint, int surfi,
const PointGeomInfo & gi1,