[cgma-dev] Strange assert code in OCCurve.cpp

Tim Tautges tautges at mcs.anl.gov
Fri Dec 16 12:56:57 CST 2011


As a general note, this is exactly the kind of smoke testing that I was hoping this exercise would provide, so keep it 
coming.  I'll let Jane sort out what's actually happening here, though I am curious who Danilov is...

- tim


On 12/16/2011 12:23 PM, Boyd Tidwell wrote:
> 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
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
  phone (gvoice): (608) 354-1459      1500 Engineering Dr.
             fax: (608) 263-4499      Madison, WI 53706



More information about the cgma-dev mailing list