[cgma-dev] Strange assert code in OCCurve.cpp
Boyd Tidwell
bktidwell373 at gmail.com
Fri Dec 16 12:23:56 CST 2011
I am in the middle of testing OCC integrated with Cubit. Many things
work just fine, some do not. I am waiting until the end of the
process to decide which bugs to try to fix myself and which to report.
But this one is so odd I just couldn't wait.
>From the cubit test suite:
create frustum height 11 radius 10 top 2
create cylinder height 1 radius 9
unit body 1 2
These commands seem to work fine. But when I try:
list surf all
I hit this code in OCCurve.cpp:
CubitStatus OCCCurve::get_interior_extrema(
DLIList<CubitVector*>& interior_points,
CubitSense& return_sense )
{
// Danilov: try to use GeomAPI_ExtremaCurveCurve
// Will do 3 primary directions seperately.
assert(0);
And, of course, it all comes to a screeching halt. There is one other
method in OCCCurve with an "assert(0);" as the first executable line
also. All "list surf all" commands for other geometry avoid this
method but something about the geom constructed by these commands
leads the code down this fatal path.
The only reason I can imagine for a hard assert as the first line of
code is a way of saying: "This code should never be called." Not the
best way to signal this condition in my book, but maybe I'm missing
something.
When the assert is removed, the list command completes with what looks
like correct info.
Thanks for looking into this one.
- Boyd
More information about the cgma-dev
mailing list