Home
Reply
Visitor
hustcad
Posts: 4

Memory Problem of HOOPS' Function-HC_KInsert_PolyCylinder(...)

we use the following code to display a B-Spline edge as a PolyCylinder, and use the function HC_Move_By_Key(...)  to highlight the PolyCylinder when we select it. but we find when nMax > 25, the memory used by the application programe increases dramatically when we select the PolyCylinder and highlight it.

 

/**********************************************************

//pEdge is a B-Spline edge

 

const int nMax = 20;

 

float fRadii = 0.1;
double dTolerance = 0.01;
double dStartParam = pEdge->start_param();
double dEndParam = pEdge->end_param();

 

int nPoints= 0;


double dParam[nMax];


SPAposition sPts[nMax];
HPoint hPts[nMax];

api_facet_curve(pEdge->geometry()->equation(), dStartParam, dEndParam,
                dTolerance, nMax,nPoints, sPts, dParam ) ;

nPoints = min(nMax,nPoints);

for ( int i=0; i<nPoints; i++ )
{
     hPts[i].Set( sPts[i].x(), sPts[i].y(), sPts[i].z() );
}


HC_KEY key = HC_KInsert_PolyCylinder( nPoints, hPts, 1, &fRadii, "both" );

if(m_pHAMap)
      m_pHAMap->AddMapping(key, pEntity);
           
/*********************************************************/
 
how to fix the problem? is there anybody can help me?
thank you!

 

New Visitor
steve0
Posts: 3

Re: Memory Problem of HOOPS' Function-HC_KInsert_PolyCylinder(...)

Have  the  same problem  ,don't  know  what  do to  either .