View Issue Details

IDProjectCategoryView StatusLast Update
0024226CommunityOCCT:Modeling Datapublic2013-10-11 12:50
Reporterbaraujo Assigned Tobaraujo  
PriorityhighSeveritycrash 
Status closedResolutionno change required 
PlatformWindowsOSVC++ 2010 
Product Version6.6.0 
Summary0024226: Crash on Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, s0, s1);
DescriptionOCC crashes when exploring the edges a simple surface. I send in the surface in attachment so you can reproduce the error.

Steps To Reproducefor (TopExp_Explorer aSurfExp(aShape, TopAbs_FACE); aSurfExp.More(); aSurfExp.Next())
{

     TopoDS_Face aFace = TopoDS::Face(aSurfExp.Current());

     for (TopExp_Explorer aWireExp(aFace, TopAbs_WIRE); aWireExp.More(); aWireExp.Next())
     {

          TopoDS_Wire aWire = TopoDS::Wire(aWireExp.Current());

          cout << "Wire" << endl;

          for (TopExp_Explorer anEdgeExp(aWireExp.Current(), TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next())
          {

               TopoDS_Edge anEdge = TopoDS::Edge(anEdgeExp.Current());

               cout << "Edge" << endl;

               double s0, s1;
     
               Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, s0, s1);

               GeomLProp_CLProps props(aCurve, (s0 + s1)*0.5, 2, Precision::Confusion());
               double aCurvature = props.Curvature();

               cout << "Curvature: " << aCurvature << endl;

          }
     }
}
TagsNo tags attached.
Test case number

Attached Files

Activities

baraujo

2013-10-05 23:57

reporter  

surface_i.step (9,482 bytes)

abv

2013-10-06 07:12

manager   ~0025915

That face has degenerated edge (an edge without 3d curve, representing a single point in 3d, required to close face boundary in parametric space of the surface with singularity). Use BRep_Tool::Degenerated() to check this situation.

baraujo

2013-10-11 12:40

reporter   ~0026046

Verifying that aCurve is null solves the problem (aCurve.IsNull()).

Issue History

Date Modified Username Field Change
2013-10-05 23:57 baraujo New Issue
2013-10-05 23:57 baraujo Assigned To => ifv
2013-10-05 23:57 baraujo File Added: surface_i.step
2013-10-06 07:12 abv Note Added: 0025915
2013-10-06 07:12 abv Assigned To ifv => baraujo
2013-10-06 07:12 abv Status new => feedback
2013-10-11 12:40 baraujo Note Added: 0026046
2013-10-11 12:50 abv Status feedback => closed
2013-10-11 12:50 abv Resolution open => no change required