0021131: EDF 1167 NETGENPLUGIN: SIGSEGV when trying to mesh a shape with degenerated edges
prevent access to NULL curve of the degenerated edge
This commit is contained in:
parent
7aacc6b391
commit
c4fe195950
@ -1416,6 +1416,16 @@ namespace
|
|||||||
const int nb = 1000;
|
const int nb = 1000;
|
||||||
Standard_Real u1, u2;
|
Standard_Real u1, u2;
|
||||||
Handle(Geom_Curve) curve = BRep_Tool::Curve(edge, u1, u2);
|
Handle(Geom_Curve) curve = BRep_Tool::Curve(edge, u1, u2);
|
||||||
|
if ( curve.IsNull() )
|
||||||
|
{
|
||||||
|
TopoDS_Iterator vIt( edge );
|
||||||
|
if ( !vIt.More() ) return;
|
||||||
|
gp_Pnt p = BRep_Tool::Pnt( TopoDS::Vertex( vIt.Value() ));
|
||||||
|
netgen::Point3d pi(p.X(), p.Y(), p.Z());
|
||||||
|
mesh.RestrictLocalH(pi, size);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Standard_Real delta = (u2-u1)/nb;
|
Standard_Real delta = (u2-u1)/nb;
|
||||||
for(int i=0; i<nb; i++)
|
for(int i=0; i<nb; i++)
|
||||||
{
|
{
|
||||||
@ -1429,6 +1439,7 @@ namespace
|
|||||||
mesh.RestrictLocalH(pi, resultSize/1.201);
|
mesh.RestrictLocalH(pi, resultSize/1.201);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user