mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +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
|
virtual PointGeomInfo ProjectPoint (int surfind, Point<3> & p) const
|
||||||
{
|
{
|
||||||
|
if(surfind <= faces.Size() && surfind > 0)
|
||||||
return faces[surfind-1]->Project(p);
|
return faces[surfind-1]->Project(p);
|
||||||
|
return PointGeomInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void ProjectPointEdge (int surfind, int surfind2, Point<3> & p, EdgePointGeomInfo* gi = nullptr) const
|
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);
|
edges[gi->edgenr]->ProjectPoint(p, gi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,11 +249,17 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
virtual bool ProjectPointGI (int surfind, Point<3> & p, PointGeomInfo & gi) const
|
virtual bool ProjectPointGI (int surfind, Point<3> & p, PointGeomInfo & gi) const
|
||||||
{
|
{
|
||||||
|
if(surfind > 0 && surfind <= faces.Size())
|
||||||
return faces[surfind-1]->ProjectPointGI(p, gi);
|
return faces[surfind-1]->ProjectPointGI(p, gi);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Vec<3> GetNormal(int surfind, const Point<3> & p, const PointGeomInfo* gi = nullptr) const
|
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,
|
virtual void PointBetween (const Point<3> & p1,
|
||||||
const Point<3> & p2, double secpoint,
|
const Point<3> & p2, double secpoint,
|
||||||
@ -260,7 +269,7 @@ namespace netgen
|
|||||||
Point<3> & newp,
|
Point<3> & newp,
|
||||||
PointGeomInfo & newgi) const
|
PointGeomInfo & newgi) const
|
||||||
{
|
{
|
||||||
if(faces.Size())
|
if(faces.Size() >= surfi && surfi > 0)
|
||||||
{
|
{
|
||||||
faces[surfi-1]->PointBetween(p1, p2, secpoint, gi1, gi2, newp, newgi);
|
faces[surfi-1]->PointBetween(p1, p2, secpoint, gi1, gi2, newp, newgi);
|
||||||
return;
|
return;
|
||||||
@ -276,7 +285,7 @@ namespace netgen
|
|||||||
Point<3> & newp,
|
Point<3> & newp,
|
||||||
EdgePointGeomInfo & newgi) const
|
EdgePointGeomInfo & newgi) const
|
||||||
{
|
{
|
||||||
if(edges.Size())
|
if(ap1.edgenr < edges.Size() && ap1.edgenr >= 0)
|
||||||
{
|
{
|
||||||
edges[ap1.edgenr]->PointBetween(p1, p2, secpoint,
|
edges[ap1.edgenr]->PointBetween(p1, p2, secpoint,
|
||||||
ap1, ap2, newp, newgi);
|
ap1, ap2, newp, newgi);
|
||||||
|
@ -900,6 +900,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
mesh.GetTopology().ClearEdges();
|
mesh.GetTopology().ClearEdges();
|
||||||
|
mesh.SetNextMajorTimeStamp();
|
||||||
mesh.UpdateTopology();
|
mesh.UpdateTopology();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ namespace netgen
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
EdgePointGeomInfo ()
|
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)
|
EdgePointGeomInfo & operator= (const EdgePointGeomInfo & gi2)
|
||||||
|
Loading…
Reference in New Issue
Block a user