Fri, 07/01/2016 - 09:44
hi ,
as described in the title of the topic , i am looking for a way to save an Axis system ( Trihedron ) in my OCAF binary
i tried to find an ATTRIBUTE for storing that but noway , my last try was like this :
Handle(XCAFDoc_Datum) AttribDatum = XCAFDoc_Datum::Set(Label);
Handle(XCAFDimTolObjects_DatumObject) DO= new XCAFDimTolObjects_DatumObject();
DO->SetDatumTargetAxis(aAxis);
AttribDatum->SetObject(DO);
Handle(TPrsStd_AISPresentation) OPresentation = TPrsStd_AISPresentation::Set(Label, XCAFDoc_Datum::GetID());
OPresentation->Update();
OPresentation->Display();
doesnt show anything
i added the next function needs a Repes ( TopoDS_Shape ) noway to convert from Geom_Axis2Placement , or gp_Ax2 or AIS_Trihedron to TopoDS_Shape
I even tried to put some random shape in it to see if it display it but nothing
DO->SetPresentation(Repes, new TCollection_HAsciiString("Axis system"));
a help or an alternative solution will be appriciated , thanks in advance.
Fri, 07/01/2016 - 10:30
Hi,
I am also storing axis systems with OCAF, but I have created specific attributes for that. See §3.4.6 in occt_ocaf.pdf.
Benjamin
Sat, 07/02/2016 - 06:09
thx for answer , any suggestions and tips about the attributes to derive from ?
Mon, 07/04/2016 - 10:33
I have derived it directly from TDF_Attribute. The axis system is stored as nine double values: three for the origin, three for the z direction and three for the x direction.