[cgma-dev] r5765 - cgm/branches/merge-cubit13.1/geom/OCC

Tim Tautges tautges at mcs.anl.gov
Thu Oct 4 15:02:14 CDT 2012


Jane, weren't you going to merge the 13.1 code into the trunk, so we're by default working on 13.1?

- tim

On 10/04/2012 11:01 AM, janehu at mcs.anl.gov wrote:
> Author: janehu
> Date: 2012-10-04 11:01:47 -0500 (Thu, 04 Oct 2012)
> New Revision: 5765
>
> Modified:
>     cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp
>     cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.hpp
>     cgm/branches/merge-cubit13.1/geom/OCC/OCCQueryEngine.cpp
> Log:
> Fixed lat4,holes problem by adding preventive check for curve's looplist, and remove stale pointers. Passed make check in related directories in cgm. cgm_apps/examples/facetdriver didn't build successfully.
>
> Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp
> ===================================================================
> --- cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp	2012-10-03 18:18:24 UTC (rev 5764)
> +++ cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp	2012-10-04 16:01:47 UTC (rev 5765)
> @@ -122,6 +122,37 @@
>     }
>   }
>
> +//-------------------------------------------------------------------------
> +// Purpose       : Add and update looplist for the curve, if input loop is
> +//                 NULL, just update the looplist.
> +// Special Notes :
> +//
> +// Creator       : Jane Hu
> +//
> +// Creation Date : 10/04/12
> +//-------------------------------------------------------------------------
> +void OCCCurve::add_loop(OCCLoop* loop)
> +{
> +  //before add the loop into the looplist, check to make sure the
> +  //looplist is up-to-date
> +  //It should be done somewhere else, however, in large mcnp2cad test, there's
> +  //no way to check where the code forget to remove the out-dated loop.
> +  for (int i = 0; i < myLoopList.size(); i++)
> +  {
> +    OCCLoop* myLoop = CAST_TO(myLoopList.get(), OCCLoop);
> +
> +    if(!myLoop)
> +      this->remove_loop(myLoopList.get());
> +    else if(myLoop->get_TopoDS_Wire() < (void*) 0x1000)
> +      this->remove_loop(myLoop);
> +    else if(myLoop->coedges().size() == 0)
> +      this->remove_loop(myLoop);
> +    myLoopList.step();
> +  }
> +  if(loop != NULL)
> +    myLoopList.append_unique(loop);
> +}
> +
>   void OCCCurve::set_TopoDS_Edge(TopoDS_Edge edge)
>   {
>     if(myTopoDSEdge && edge.IsEqual(*myTopoDSEdge))
> @@ -755,6 +786,9 @@
>
>   void OCCCurve::get_parents_virt( DLIList<TopologyBridge*>& parents )
>   {
> +   //check to see all myLoops are up-to-date.
> +   add_loop(NULL);
> +
>      for(int i = 0; i < myLoopList.size(); i++)
>      {
>

-- 
================================================================
"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