Creating a TDF_Label for a Axis system.


i'm new to Opencascade and i need some basic help =)

i need to create a TDF_Label for my Axis created this way :

    gp_Pnt centerPoint(x0, y0, z0);
    gp_Dir normalDirection(0.0, 0.0, 1.0);
    gp_Dir xDirection(1.0, 0.0, 0.0);
    gp_Ax2 axis(centerPoint, normalDirection, xDirection);
    Handle(AIS_Trihedron) aTrihedron;
    Handle(Geom_Axis2Placement) aTrihedronAxis = new Geom_Axis2Placement(axis);
    aTrihedron = new AIS_Trihedron(aTrihedronAxis);

and in witch ATTRIBUTE do i need to put its geometry into


Qr Qr's picture

If I were you, I would prefer storing all 9 values in a single TDataStd_RealArray attribute, and then write a small piece of logic to treat these values as axes. Using standard OCAF (without deriving your own attributes) eases your life as you may use standard profiling tools, like DFBrowse command in Draw. With such approach your OCAF data are not aware of any AIS or any other kind of visualization, which is a good practice to follow. However, you will need to elaborate some architecture which binds visualization to your OCAF. The latter is your job as a programmer. Good luck with OCAF!

zine zerdoum's picture

ill give it a try , thank you.