Bug of OCC6.5.3: Building loft surface crash.

Hi All,

Load attached brep file. Use BRepOffsetAPI_ThruSections to create a loft surface by selecting two circle curves. It will crash in
BRepFill_Generator.cxx. Crash point is:
gp_Circ k1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
Here C1 is a TrimmedCurve and its basic curve is a circle. So this conversion will failed.

I have compared OCC6.5.3 and OCC6.5.4. No updates in this file.
Thanks in advance.


Forum supervisor's picture

Dear Cauchy Ding,
It seems the problem is in your data (the first wire).
Simple rebuilding of the wire allows to get the expected result.
> pload ALL
> restore error3.brep s
> explo s
# s_1 s_2
> explo s_1
# s_1_1
> whatis s_1_1
# s_1_1 is a shape EDGE REVERSED Modified Orientable Closed
> mkcurve c1 s_1_1
> mkedge e1 c1
> wire w1 e1
> thru r 0 0 w1 s_2
> checkshape r
# This shape seems to be valid

See the resulting shell attached.

Cauchy Ding's picture

Dear Supervisor,

Thanks for your feedback. Those two edges are from faces which topology correct. Yes, the crash is not caused by algorithm but a type conversion bug in BRepFill_Generator.cxx. Rebuild curve will erase this problem because the tolerance will be reset.