I encountered some problem with the BRepTopAdaptor_FClass2d class. For a new created face, all the results are correct. But if i make a translation of the created face and check the position of a point according the translated face, the classifier seems to work on the original shape and not the transformed one.
It doesn't seems to take in account the location of the translated shape.
Is it normal? What can i do to get it work?
Modify the original geometry (i don't want that but if it is the only way...)?
I give an example. All the tests_case return OK. The 3 last must return false.
const gp_Pnt p1(0.0,0.0,0.0);
const gp_Pnt p2(1.0,0.0,0.0);
const gp_Pnt p3(1.0,1.0,0.0);
const gp_Pnt p4(0.0,1.0,0.0);
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(p1);
TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(p2);
TopoDS_Vertex V3 = BRepBuilderAPI_MakeVertex(p3);
TopoDS_Vertex V4 = BRepBuilderAPI_MakeVertex(p4);
const TopoDS_Wire& wire = polygon.Wire();
const TopoDS_Face& face = faceBuilder.Face();
const gp_Pnt2d pIn(0.5,0.5);
const gp_Pnt2d pOut(2.0,2.0);
const gp_Pnt2d pOn(0.0,0.0);
BRepTopAdaptor_FClass2d aClassifier (face, Precision::Approximation()) ;
TopAbs_State aPtInState = aClassifier.Perform ( pIn );
TopAbs_State aPtOutState = aClassifier.Perform ( pOut );
TopAbs_State aPtOnState = aClassifier.Perform ( pOn );
//Transform the face
const gp_Pnt2d p5(5.0,5.0);
TopoDS_Face transformedFace = TopoDS::Face(face.Moved(trsf));
BRepTopAdaptor_FClass2d aClassifier2 (transformedFace, Precision::Approximation()) ;
aPtInState = aClassifier2.Perform( pIn );
aPtOutState = aClassifier2.Perform ( pOut );
aPtOnState = aClassifier2.Perform ( pOn );
Thanks in advance to explain me what is wrong. If it is me or it is a bug?