JuryS Sat, 11/27/2010 - 00:45 Forums: Other usage issuesHi, guys ! I have some problem with use HLR algoritm. When I try to hide the pipe, created with BRepPrimAPI_MakePrism, I have next view. Attachments: 2.png JuryS Sat, 11/27/2010 - 00:46 Also, here how It most be. Attachments: 1_0.png Log in to post comments JuryS Sat, 11/27/2010 - 00:50 Also I try to make some optimization with HLR Algo, because It's work very slowly and I can't understand what is 0x80008000 in HLRBRep_InternalAlgo.cxx: if (((MaxShBJ1 - MinShBI1) & 0x80008000) == 0 && ((MaxShBI1 - MinShBJ1) & 0x80008000) == 0 && ((MaxShBJ2 - MinShBI2) & 0x80008000) == 0 && ((MaxShBI2 - MinShBJ2) & 0x80008000) == 0 && ((MaxShBJ3 - MinShBI3) & 0x80008000) == 0 && ((MaxShBI3 - MinShBJ3) & 0x80008000) == 0 && ((MaxShBJ4 - MinShBI4) & 0x80008000) == 0 && ((MaxShBI4 - MinShBJ4) & 0x80008000) == 0 && ((MaxShBJ5 - MinShBI5) & 0x80008000) == 0 && ((MaxShBI5 - MinShBJ5) & 0x80008000) == 0 && ((MaxShBJ6 - MinShBI6) & 0x80008000) == 0 && ((MaxShBI6 - MinShBJ6) & 0x80008000) == 0 && ((MaxShBJ7 - MinShBI7) & 0x80008000) == 0 && ((MaxShBJ8 - MinShBI8) & 0x80008000) == 0) { Also I think that is very slowly working because Hide is calling for many times without the reason with i and j : void HLRBRep_InternalAlgo::Hide () { if (!myDS.IsNull()) { Standard_Integer i,j,n = myShapes.Length(); if (myDebug) cout << " Total hiding" << endl; for (i = 1; i <= n; i++) Hide(i); for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) if (i != j) Hide(i,j); Select(); } } Or maybe we have some optimization with new release of OCC ? Log in to post comments JuryS Sat, 11/27/2010 - 11:28 Also some memory leeks with use HLRTopoBRep_DSFiller::Insert BRepTopAdaptor_Tool BRT(S1,Precision::PConfusion()); MST.Bind(S1,BRT); // - !!!HERE THE MEMORY LEEKS Domain = BRT.GetTopolTool(); Surface = BRT.GetSurface(); I'm find the Bind function and may free memory with UnBind, but the program crash... Any help ? Log in to post comments
Sat, 11/27/2010 - 00:46
Also, here how It most be.
Sat, 11/27/2010 - 00:50
Also I try to make some optimization with HLR Algo, because It's work very slowly and I can't understand what is 0x80008000 in HLRBRep_InternalAlgo.cxx:
if (((MaxShBJ1 - MinShBI1) & 0x80008000) == 0 &&
((MaxShBI1 - MinShBJ1) & 0x80008000) == 0 &&
((MaxShBJ2 - MinShBI2) & 0x80008000) == 0 &&
((MaxShBI2 - MinShBJ2) & 0x80008000) == 0 &&
((MaxShBJ3 - MinShBI3) & 0x80008000) == 0 &&
((MaxShBI3 - MinShBJ3) & 0x80008000) == 0 &&
((MaxShBJ4 - MinShBI4) & 0x80008000) == 0 &&
((MaxShBI4 - MinShBJ4) & 0x80008000) == 0 &&
((MaxShBJ5 - MinShBI5) & 0x80008000) == 0 &&
((MaxShBI5 - MinShBJ5) & 0x80008000) == 0 &&
((MaxShBJ6 - MinShBI6) & 0x80008000) == 0 &&
((MaxShBI6 - MinShBJ6) & 0x80008000) == 0 &&
((MaxShBJ7 - MinShBI7) & 0x80008000) == 0 &&
((MaxShBJ8 - MinShBI8) & 0x80008000) == 0) {
Also I think that is very slowly working because Hide is calling for many times without the reason with i and j :
void HLRBRep_InternalAlgo::Hide ()
{
if (!myDS.IsNull()) {
Standard_Integer i,j,n = myShapes.Length();
if (myDebug)
cout << " Total hiding" << endl;
for (i = 1; i <= n; i++)
Hide(i);
for (i = 1; i <= n; i++)
for (j = 1; j <= n; j++)
if (i != j) Hide(i,j);
Select();
}
}
Or maybe we have some optimization with new release of OCC ?
Sat, 11/27/2010 - 11:28
Also some memory leeks with use HLRTopoBRep_DSFiller::Insert
BRepTopAdaptor_Tool BRT(S1,Precision::PConfusion());
MST.Bind(S1,BRT); // - !!!HERE THE MEMORY LEEKS
Domain = BRT.GetTopolTool();
Surface = BRT.GetSurface();
I'm find the Bind function and may free memory with UnBind, but the program crash...
Any help ?