I am trying to calculate the volume of a solid and also classify point against it (in or out). In the attached image you can see a point marked with a yellow + that is classified as inside the black solid segment (clearly incorrect). I also know the volume of the black solid is incorrectly calculated (the volume is positive but about 30% less than the expected value). Here is how I generate the solid and check a point if it is IN or OUT:
TopoDS_Shape solidShape = generator.Shape();
gp_Pnt checkPoint(0.365350, 0.15, -0.005166);
BRepClass3d_SolidClassifier solidClass(solidShape, checkPoint, 1.0e-6);
TopAbs_State state = solidClass.State();
Standard_Real vol2 = props2.Mass();
For the 40 segments shown in the image only 2 segments have this problem of incorrect classification of points and volumes. All segments are constructed from wires that are created from hexagonal array of points. Any ideas on how to diagnose the problem with solid and correct it would be greatly appreciated. BTW, I am using OpenCASCADE 6.5.0.