I have some problems to use the BRepBuilderAPI_Transform class.
First i work in 2D. So i ask me if it is posible to use BRepBuilderAPI_Transform in a 2D environment.
I explain. I create edge 2d with the command GCE2d_MakeEdge2d and store them in a TopoDS_wire.
I would like to make a mirror of my TopoDS_wire but it doesn't work. It returns me the same wire instead of doing the mirror.
I have try with the tutorial example and it is the same it doesn't work.
//Profile : Define Support Points
Standard_Real myWidth = 50.0;
Standard_Real myThickness = 30.0;
gp_Pnt2d aPnt1(-myWidth / 2. , 0 );
gp_Pnt2d aPnt2(-myWidth / 2. , -myThickness / 4.);
gp_Pnt2d aPnt3(0 , -myThickness / 2.);
gp_Pnt2d aPnt4(myWidth / 2. , -myThickness / 4.);
gp_Pnt2d aPnt5(myWidth / 2. , 0);
Handle(Geom2d_TrimmedCurve) aArcOfCircle = GCE2d_MakeArcOfCircle(aPnt2,aPnt3 ,aPnt4);
Handle(Geom2d_TrimmedCurve) aSegment1 = GCE2d_MakeSegment(aPnt1 , aPnt2);
Handle(Geom2d_TrimmedCurve) aSegment2 = GCE2d_MakeSegment(aPnt4 , aPnt5);
//Profile : Define the Topology
TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge2d(aSegment1);
TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge2d(aArcOfCircle);
TopoDS_Edge aEdge3 = BRepBuilderAPI_MakeEdge2d(aSegment2);
TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(aEdge1 , aEdge2 , aEdge3);
gp_Pnt2d aOrigin(0 , 0);
gp_Dir2d xDir(1 , 0);
gp_Ax2d xAxis(aOrigin , xDir);
/// I have try with Standard_false but is worst, it crash the application
BRepBuilderAPI_Transform aBRepTrsf(aWire , aTrsf, Standard_True);
TopoDS_Shape aMirroredShape = aBRepTrsf.Shape();
TopoDS_Wire aMirroredWire = TopoDS::Wire(aBRepTrsf.Shape());
return aMirroredWire ;
The problem is that instead of having wire mirrored, it gave me the same wire (the mirrored wire is equal as the original wire).
It is like if the transformation doesn't modify the shape.
I've try with all in 3d (gp_Pnt instead of gp_Pnt2d etc..) but it is the same. I don't understand why it doesn't work !!!!
Thanks in advance for some idea.