View Issue Details

IDProjectCategoryView StatusLast Update
0033113CommunityOCCT:Modeling Algorithmspublic2022-08-26 16:48
Reporterdratner Assigned Tomsv  
PrioritynormalSeveritycrash 
Status newResolutionopen 
PlatformWindowsOSVC++ 2015 
Product Version7.3.0 
Target Version7.7.0 
Summary0033113: Modeling Algorithms - BRepFilletAPI_MakeFillet::Build SIGSEGV
DescriptionBRepFilletAPI_MakeFillet generates a SIGSEGV when filleting the fourth edge (circled in red in 2edge_fillet.jpg and also found as the fourth edge from a TopExp::MapShapes (bodyShp, TopAbs_EDGE, ...) query). The 11th edge (also highlighted in yellow) is added to the circuit (within the filleting algorithm. Here is a stack:

Given:
TopoDS_Solid bodyShp;
TopoDS_Edge edgeShp;
double radius = 0.1;

      BRepFilletAPI_MakeFillet fillet(bodyShp);
      fillet.Add(radius, edgeShp);
      fillet.Build();
        ChFi3d_FilBuilder myBuilder.Compute();
          for (j) = 1, 2
          2: ChFi3d_FilBuilder::PerformFilletOnVertex(const Standard_Integer Index = j);  // Index == 2
            myVDataMap(2)::FindKey(Index) > TopoDS_Vertex = (-1.3220155066999999, -0.34, 1.0)
            ChFi3d_FilBuilder::PerformOneCorner(Index)
              Vtx = myVDataMap.FindKey(Index);  // same
              Arcprol = TopoDS_Edge, Fop = TopoDS_Face (Plane), Ubid = 0.0
                  Handle(Geom2d_Curve) Hc = BRep_Tool::CurveOnSurface(Arcprol,Fop,Ubid,Ubid);  // Hc == 0x0!!!
                // Returns NULL if curve DNE
              Hc->Value(parVtx)  // SEGV
Steps To Reproduce1. Load 2edge_fillet.brep
2. Construct BRepFilletAPI_MakeFillet fillet object with bodyShp
3. Add (radius, edgeShp)
4. Call fillet.Build()
Additional information
and documentation updates
ChFi3d_FilBuilder::PerformOneCorner might be made more robust by adding checks for NULL pointers before dereferencing. Throwing an exception might be acceptable, or something more elaborate.
TagsNo tags attached.
Test case number

Attached Files

  • 2edge_fillet.brep (5,825 bytes)
  • 2edge_fillet.jpg (82,271 bytes)

Activities

dratner

2022-08-26 02:36

reporter   ~0110373

This is my first submission. I did not know who to assign to, so please reassign if necessary. I also attached two files but I don't see them here. If you do not see them, please let me know and I'll try again. Thanks!

kgv

2022-08-26 09:17

developer   ~0110376

@dratner

> I did not know who to assign to, so please reassign if necessary.
Bugtracker automatically selects assigning person based on selected Category - so just try to choose a relevant category and don't change default assignee.
In case, if responsible for a Category will found bug irrelevant to it - he will move it to a better place, hence nothing to worry about (but this might have some considerable lag, so that choosing relevant Category is desirable).

> I also attached two files but I don't see them here.
Please re-attach them - there might be a bug in Mantis causing file attachment during bug creation being lost.

dratner

2022-08-26 16:48

reporter   ~0110381

Attaching files: 2edge_fillet.{brep, jpg}
2edge_fillet.brep (5,825 bytes)
2edge_fillet.jpg (82,271 bytes)

Issue History

Date Modified Username Field Change
2022-08-26 02:31 dratner New Issue
2022-08-26 02:31 dratner Assigned To => msv
2022-08-26 02:36 dratner Note Added: 0110373
2022-08-26 09:17 kgv Note Added: 0110376
2022-08-26 09:18 kgv Description Updated
2022-08-26 09:18 kgv Target Version => 7.7.0
2022-08-26 09:18 kgv Summary BRepFilletAPI_MakeFillet::Build SIGSEGV => Modeling Algorithms - BRepFilletAPI_MakeFillet::Build SIGSEGV
2022-08-26 16:48 dratner Note Added: 0110381
2022-08-26 16:48 dratner File Added: 2edge_fillet.brep
2022-08-26 16:48 dratner File Added: 2edge_fillet.jpg