+//=====================================================================================
+// function : MakeEllipseAndDisplay()
+// purpose :
+//=====================================================================================
+void GeometryGUI::MakeEllipseAndDisplay( const gp_Pnt CenterPoint,
+ const gp_Dir dir,
+ const Standard_Real Major_Radius,
+ const Standard_Real Minor_Radius )
+{
+ try {
+ GEOM::PointStruct pstruct = myComponentGeom->MakePointStruct( CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z() ) ;
+ GEOM::PointStruct d = myComponentGeom->MakePointStruct( dir.X(), dir.Y(), dir.Z() ) ;
+ GEOM::DirStruct dstruct = myComponentGeom->MakeDirection(d) ;
+
+ GEOM::GEOM_Shape_var result = myComponentGeom->MakeEllipse(pstruct, dstruct, Major_Radius, Minor_Radius) ;
+ if ( result->_is_nil() ) {
+ myDesktop->putInfo(tr("GEOM_PRP_ABORT") );
+ return ;
+ }
+ result->NameType(tr("GEOM_ELLIPSE"));
+ if ( Display( result ) )
+ myDesktop->putInfo(tr("GEOM_PRP_DONE"));
+ }
+ catch (const SALOME::SALOME_Exception& S_ex) {
+ QtCatchCorbaException(S_ex);
+ }
+ return ;
+}
+