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

Jane Hu janejhu at gmail.com
Mon Dec 19 09:42:22 CST 2011


Thank you, Boyd. It seems that these two functions were not implemented
before, so people gave them a hard assertion of zero to indicate, as you
said, that these code should not be called. BTW, I don't know who Danilov
is either. Later, we implemented the code, but somehow it seems not on the
high priority list, so it's not been tested yet, and the assertion was not
removed.

I am glad that you take some effort testing them, and it seems that besides
the assertion, the rest of the codes worked as expected. I've removed the
assertions, and the code has been up-date for this change now.

Thank you again for the kind note and happy testing!

Jane

On Fri, Dec 16, 2011 at 12:23 PM, Boyd Tidwell <bktidwell373 at gmail.com>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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20111219/bd1c2a16/attachment.htm>


More information about the cgma-dev mailing list