- // Get shape's position
- CORBA::Double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz, Yx, Yy, Yz;
- Ox = Oy = Oz = Zx = Zy = Xy = Xz = Yx = Yz = 0;
- Zz = Xx = Yy = 1.;
-
- GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
- myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
- aMeasureOp->GetPosition( aSelectedObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz );
-
- // Calculate Y direction
- if ( aMeasureOp->IsDone() ) {
- gp_Pnt aPnt ( Ox, Oy, Oz );
- gp_Dir aDirN ( Zx, Zy, Zz );
- gp_Dir aDirX ( Xx, Xy, Xz );
- gp_Ax3 anAx3 ( aPnt, aDirN, aDirX );
-
- gp_Dir aDirY = anAx3.YDirection();
- aDirY.Coord(Yx,Yy,Yz);
- }
-
- // Set values
- myData[ X ]->setValue( Ox );
- myData[ Y ]->setValue( Oy );
- myData[ Z ]->setValue( Oz );
-
- myData[ DX1 ]->setValue( Xx );
- myData[ DY1 ]->setValue( Xy );
- myData[ DZ1 ]->setValue( Xz );
-
- myData[ DX2 ]->setValue( Yx );
- myData[ DY2 ]->setValue( Yy );
- myData[ DZ2 ]->setValue( Yz );
-