mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
Merge branch 'fix_curve_boundarylayer_occ' into 'master'
[occ] fix boundarylayer + curve See merge request jschoeberl/netgen!484
This commit is contained in:
commit
5272106a9c
@ -232,11 +232,14 @@ namespace netgen
|
||||
|
||||
virtual PointGeomInfo ProjectPoint (int surfind, Point<3> & p) const
|
||||
{
|
||||
if(surfind <= faces.Size() && surfind > 0)
|
||||
return faces[surfind-1]->Project(p);
|
||||
return PointGeomInfo();
|
||||
}
|
||||
|
||||
virtual void ProjectPointEdge (int surfind, int surfind2, Point<3> & p, EdgePointGeomInfo* gi = nullptr) const
|
||||
{
|
||||
if(gi && gi->edgenr < edges.Size())
|
||||
edges[gi->edgenr]->ProjectPoint(p, gi);
|
||||
}
|
||||
|
||||
@ -246,11 +249,17 @@ namespace netgen
|
||||
}
|
||||
virtual bool ProjectPointGI (int surfind, Point<3> & p, PointGeomInfo & gi) const
|
||||
{
|
||||
if(surfind > 0 && surfind <= faces.Size())
|
||||
return faces[surfind-1]->ProjectPointGI(p, gi);
|
||||
}
|
||||
|
||||
virtual Vec<3> GetNormal(int surfind, const Point<3> & p, const PointGeomInfo* gi = nullptr) const
|
||||
{ return faces[surfind-1]->GetNormal(p, gi); }
|
||||
{
|
||||
if(surfind > 0 && surfind <= faces.Size())
|
||||
return faces[surfind-1]->GetNormal(p, gi);
|
||||
else
|
||||
return {0., 0., 0.};
|
||||
}
|
||||
|
||||
virtual void PointBetween (const Point<3> & p1,
|
||||
const Point<3> & p2, double secpoint,
|
||||
@ -260,7 +269,7 @@ namespace netgen
|
||||
Point<3> & newp,
|
||||
PointGeomInfo & newgi) const
|
||||
{
|
||||
if(faces.Size())
|
||||
if(faces.Size() >= surfi && surfi > 0)
|
||||
{
|
||||
faces[surfi-1]->PointBetween(p1, p2, secpoint, gi1, gi2, newp, newgi);
|
||||
return;
|
||||
@ -276,7 +285,7 @@ namespace netgen
|
||||
Point<3> & newp,
|
||||
EdgePointGeomInfo & newgi) const
|
||||
{
|
||||
if(edges.Size())
|
||||
if(ap1.edgenr < edges.Size() && ap1.edgenr >= 0)
|
||||
{
|
||||
edges[ap1.edgenr]->PointBetween(p1, p2, secpoint,
|
||||
ap1, ap2, newp, newgi);
|
||||
|
@ -900,6 +900,7 @@ namespace netgen
|
||||
}
|
||||
|
||||
mesh.GetTopology().ClearEdges();
|
||||
mesh.SetNextMajorTimeStamp();
|
||||
mesh.UpdateTopology();
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ namespace netgen
|
||||
|
||||
public:
|
||||
EdgePointGeomInfo ()
|
||||
: edgenr(0), body(0), dist(0.0), u(0.0), v(0.0) { ; }
|
||||
: edgenr(-1), body(0), dist(0.0), u(0.0), v(0.0) { ; }
|
||||
|
||||
|
||||
EdgePointGeomInfo & operator= (const EdgePointGeomInfo & gi2)
|
||||
|
Loading…
Reference in New Issue
Block a user