Archived issue #0024767
Crash on making edges in HLRBRep
Description
On HLRBRep::MakeEdge() step: if incoming curve is a trimmed B-spline one, downcast of Geom_Curve to Geom_BSplineCurve leads to null object and crash.
Steps to reproduce
The crash is reprodused on MFC HLR sample:
1) Run MFC HLR sample
2) File->Import->Brep
3) Choose the restored shape in 3D view and press HLR button (or File->Process HLR)
4) Press 'Get shapes' button with default parameters in dialog
5) Then, after result has been displayed in 2d HLR view, choose 'Algo' radio button in the HLR dialog.
1) Run MFC HLR sample
2) File->Import->Brep
3) Choose the restored shape in 3D view and press HLR button (or File->Process HLR)
4) Press 'Get shapes' button with default parameters in dialog
5) Then, after result has been displayed in 2d HLR view, choose 'Algo' radio button in the HLR dialog.
Additional information
HLRBRep: modified method
TopoDS_Edge HLRBRep::MakeEdge (const HLRBRep_Curve& ec,
const Standard_Real U1,
const Standard_Real U2)
safe code: additional check of the type of the curve.
TopoDS_Edge HLRBRep::MakeEdge (const HLRBRep_Curve& ec,
const Standard_Real U1,
const Standard_Real U2)
safe code: additional check of the type of the curve.
Public activity
3 archived notes
Participants are labeled by their role within this record.
The branch CR24767 is ready for testing.
The branch CR24767-00660-TATA is ready for testing.
Dear Commenter 2,
Branch CR24767 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 29 (29 on master)
Windows: 0 (0 on master)
products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 391212232 / 391508452
Total CPU difference: 70509.40999999974 / 51359.14999999966
Testing on Windows:
Total MEMORY difference: 396029020 / 395846248
Total CPU difference: 35441.546875 / 35037.796875
There are no differences in images found by testdiff.
Branch CR24767 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 29 (29 on master)
Windows: 0 (0 on master)
products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 391212232 / 391508452
Total CPU difference: 70509.40999999974 / 51359.14999999966
Testing on Windows:
Total MEMORY difference: 396029020 / 395846248
Total CPU difference: 35441.546875 / 35037.796875
There are no differences in images found by testdiff.