Hang in BRepClass3d_SolidClassifier

Hi,

Load attached brep file, try to classify the independent vertex with the solid, BRepClass3d_SolidClassifier will hang in BRepClass3d_SolidExplorer::OtherSegment. It hangs both in 6.3 and 6.5.1. The tolerance is set as 1.0e-4.
Thanks.

Ding

Attachments: 
xumingstar's picture

I found this endless loop too. You can check may topic.

http://www.opencascade.org/org/forum/thread_21981/

Forum supervisor's picture

Dear Cauchy,
The problem described by you is not reproducible on Windows platform starting from release 6.3 till the 6.5.1 with any of tolerance from 0.1 till 1.e-7.
To check it you can use simple Draw command :
Draw[11]> help bclassify
bclassify : Use >bclassify Solid Point [Tolerance=1.e-7]

Draw testing script.
pload DEFAULT
restore solidclassify.brep s
explo s
whatis s_1
whatis s_2
bclassify s_2 s_1
## ==>The point is OUT of shape
bclassify s_2 s_1 1.e-4
## ==>The point is OUT of shape

At the same time I would like to pay your attention that you are using not valid shape (solid without volume):
Draw[21]> checkshape s_2
Shape faulty_1 on shape faulty_2 :
BRepCheck_NotClosed

Faulty shapes in variables faulty_1 to faulty_2

The mentioned Draw command is very simple (see BOPTest_LowCommands.cxx):
//
TopAbs_State aState = TopAbs_UNKNOWN;
BRepClass3d_SolidClassifier aSC(aS);
aSC.Perform(aP,aTol);
aState = aSC.State();
PrintState (aDI, aState);
//

Regards

Cauchy Ding's picture

Hi Supervisor,

Thank you for your reply. Yes, the solid has topology error because it's not closed. However, the face is correct in topology and in geometry and this case should be accpeted for this testing. Why I will test a open solid with a point? I want to cut a face by another face. Many guys told me that I should assembly two faces to two solids and use Boolean operation to get the cutting result.
My codes is almost the same with yours:
BRepClass3d_SolidClassifier classify;
classify.Load(solid);
classify.Perform(pnt, distol);
My testing platform is Win64+VS2010+Debug version. My OS is Win7. If possible, please kindly test it using debug version.

Regards.
Ding

Forum supervisor's picture

Dear Cauchy,
I have checked the case on two platforms:
- MS Windows 7 Win64 & VC10 (Debug & Release modes)
- MS Windows XP Win64 & VC10 (Debug & Release modes)
It works perfectly and always gives the same results for all tolerances between 1.e-1 and 1.e-7:
==>The point is OUT of shape.
Regards

Cauchy Ding's picture

Hi Supervisor,

Thank you for your so fast reply. Okay, I will check it further.
Regards.

Ding