- myGeomBase->EraseSimulationShape();
- mySimulationTopoDs.Nullify();
-
- try {
- if(myPoint2.IsEqual(myPoint1, Precision::Confusion()) ||
- myPoint2.IsEqual(myPoint3, Precision::Confusion())) {
- myEditCurrentArgument->setText("");
- return;
- }
-
- gp_Vec v1(myPoint2, myPoint1);
- gp_Vec v2(myPoint2, myPoint3);
- if(v1.IsParallel(v2, Precision::Angular())) {
- myEditCurrentArgument->setText("");
- return;
- }
-
- GC_MakeArcOfCircle Arc(myPoint1, myPoint2, myPoint3);
- if(Arc.IsDone()) {
- Handle(Geom_TrimmedCurve) curve = Arc.Value();
- mySimulationTopoDs = BRepBuilderAPI_MakeEdge(curve).Shape();
- myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
- }
- }
- catch(Standard_Failure) {
- MESSAGE("Exception catched in MakeArcSimulationAndDisplay");
- }
- return;
+ return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() &&
+ !isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
+}
+
+//=================================================================================
+// function : execute
+// purpose :
+//=================================================================================
+bool BasicGUI_ArcDlg::execute( ObjectList& objects )
+{
+ GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeArc( myPoint1, myPoint2, myPoint3 );
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+ return true;
+}
+
+//=================================================================================
+// function : closeEvent
+// purpose :
+//=================================================================================
+void BasicGUI_ArcDlg::closeEvent( QCloseEvent* e )
+{
+ myGeomGUI->SetState( -1 );
+ GEOMBase_Skeleton::closeEvent( e );