Hi!
I've got an issue with BRepPrimAPI_MakeRevol if myPnts(2) = gp_Pnt(0.00000035, 8.0, 0.0); !
Trying with myPnts(2) = gp_Pnt(0.0, 8.0, 0.0); build myShape correctly.
Here is the code :
TColgp_Array1OfPnt myPnts(1, 4);
myPnts(1) = gp_Pnt(0.0, 0.0, 0.0);
myPnts(2) = gp_Pnt(0.00000035, 8.0, 0.0); // here is the problem !?
myPnts(3) = gp_Pnt(-81.0, 8.0, 0.0);
myPnts(4) = gp_Pnt(-81.0, 0.0, 0.0);
BRepBuilderAPI_MakeWire myWire;
for (Standard_Integer i = 1; i
{
BRepBuilderAPI_MakeEdge myEdge(myPnts(i), myPnts(i + 1));
myWire.Add(myEdge);
}
TopoDS_Face myFace = BRepBuilderAPI_MakeFace(myWire.Wire());
gp_Ax1 myAxis(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0));
TopoDS_Shape myShape = BRepPrimAPI_MakeRevol(myFace, myAxis).Shape();
Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplication();
Handle(TDocStd_Document) aDoc;
anApp->NewDocument("MDTV-XCAF", aDoc);
Handle(XCAFDoc_ColorTool) myColors = XCAFDoc_DocumentTool::ColorTool(aDoc->Main());
Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main());
TDF_Label aLabel = myAssembly->NewShape();
myAssembly->SetShape(aLabel, (TopoDS_Shape)myShape);
auto *myWriter = new STEPCAFControl_Writer();
myWriter->Perform(aDoc, "C://tmp//aaa.stp");
Something is wrong with the tolerances but I can't figure what.
Thanks for any help/suggestion !
S.