Thu, 03/21/2013 - 16:50
Hi,
I try the following code. But the result was not 0101.
What is wrong?
Thank you for your help.
{
Handle(AppStd_Application) app = new AppStd_Application();
Handle(TDocStd_Document) doc;
app->NewDocument("BinOcaf", doc);
TDF_Label MainLab = doc->Main();
TopoDS_Vertex S1 = BRepBuilderAPI_MakeVertex(gp_Pnt(0,0,0));
TDF_Label child = MainLab.FindChild(1, Standard_True);
TNaming_Builder B(child);
B.Generated(S1);
TopoDS_Shape S2 = S1.Reversed();
child = MainLab.FindChild(2, Standard_True);
TNaming_Builder BB(child);
BB.Generated(S2);
TCollection_ExtendedString TPath("D:\\a.cbf");
TCollection_ExtendedString status;
Standard_Boolean result = app->SaveAs(doc,TPath,status);
child = MainLab.FindChild(1, Standard_False);
TNaming_Iterator itL = TNaming_Iterator(child);
TopoDS_Shape S21 = itL.NewShape();
child = MainLab.FindChild(2, Standard_False);
itL = TNaming_Iterator(child);
TopoDS_Shape S22 = itL.NewShape();
cout cout cout cout }
Thu, 03/21/2013 - 17:22
Dear Hayashi,
In general OCAF component doesn't distinguish shapes
which are the Same (S1.IsSame (S2) == True).
Orientation may be maintained for NamedShapes with
SELECTED evolution only (for all types of shape except VERTEX).
See TNaming_Selector::Select(...) method.
Regards
Fri, 03/22/2013 - 06:55
Dear Forum supervisor,
In my application, OCAF is performing only storing of Shapes.
Orientaion will be managed independently.
Thank you