GetTangentialSurfaceIndices was missing for extrusion

This commit is contained in:
Joachim Schöberl 2020-07-05 11:15:39 +02:00
parent fdd718739f
commit 8926d93e07
2 changed files with 25 additions and 0 deletions

View File

@ -415,6 +415,14 @@ namespace netgen
} }
bool ExtrusionFace :: PointInFace (const Point<3> & p, const double eps) const
{
Point<3> hp = p;
Project(hp);
return Dist2(p,hp) < sqr(eps);
}
void ExtrusionFace :: LineIntersections ( const Point<3> & p, void ExtrusionFace :: LineIntersections ( const Point<3> & p,
const Vec<3> & v, const Vec<3> & v,
const double eps, const double eps,
@ -737,6 +745,16 @@ namespace netgen
return PointInSolid(p,eps,NULL); return PointInSolid(p,eps,NULL);
} }
void Extrusion :: GetTangentialSurfaceIndices (const Point<3> & p,
NgArray<int> & surfind, double eps) const
{
for (int j = 0; j < faces.Size(); j++)
if (faces[j] -> PointInFace(p, eps))
if (!surfind.Contains (GetSurfaceId(j)))
surfind.Append (GetSurfaceId(j));
}
INSOLID_TYPE Extrusion :: VecInSolid (const Point<3> & p, INSOLID_TYPE Extrusion :: VecInSolid (const Point<3> & p,
const Vec<3> & v, const Vec<3> & v,
double eps) const double eps) const

View File

@ -94,6 +94,9 @@ namespace netgen
int & after, int & after,
bool & intersecting ) const; bool & intersecting ) const;
bool PointInFace (const Point<3> & p, const double eps) const;
INSOLID_TYPE VecInFace ( const Point<3> & p, INSOLID_TYPE VecInFace ( const Point<3> & p,
const Vec<3> & v, const Vec<3> & v,
const double eps ) const; const double eps ) const;
@ -146,6 +149,10 @@ namespace netgen
INSOLID_TYPE PointInSolid (const Point<3> & p, INSOLID_TYPE PointInSolid (const Point<3> & p,
double eps, double eps,
NgArray<int> * const facenums) const; NgArray<int> * const facenums) const;
virtual void GetTangentialSurfaceIndices (const Point<3> & p,
NgArray<int> & surfind, double eps) const;
virtual INSOLID_TYPE VecInSolid (const Point<3> & p, virtual INSOLID_TYPE VecInSolid (const Point<3> & p,
const Vec<3> & v, const Vec<3> & v,
double eps) const; double eps) const;