how to display the coordinate system

can anyone please tell me how to dipslay coordinate system under OCAF?

thanks
Eric

Matthias Teich's picture

I dont know OCAF, do you have a view and a viewer there?
If yes, you can explicitly draw it with BrepBuilderAPI or you can display a tetrahedron which shows the rotation of the coordinate system.

Sharjith Naramparambath's picture

You can use AIS_Trihedron
See the documentation for the constructor.
It is derived from AIS_Shape and just needs to be added to the AIS_InteractiveContext thru Display() method.

Regards
N. Sharjith

renyu_teng's picture

thanks. I will try it out.

Maciej Stankiewicz's picture

my example:
// in constructor of C???Doc (C???Doc.cpp)
myAISContext =new AIS_InteractiveContext(myViewer,myViewerCollector);
// TRIHEDRON
Handle(AIS_Trihedron) aTrihedron;
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
myAISContext->Display(aTrihedron);