+
+ if (aType == CIRC_ARC_THREE_PNT)
+ {
+ GC_MakeArcOfCircle arc (aP1, aP2, aP3);
+ aShape = BRepBuilderAPI_MakeEdge(arc).Edge();
+ } else if ( aType == CIRC_ARC_CENTER ) { // CIRC_ARC_CENTER
+ Standard_Boolean sense = aCI.GetSense();
+
+ Standard_Real aRad = aP1.Distance(aP2);
+ gp_Vec aV1 (aP1, aP2);
+ gp_Vec aV2 (aP1, aP3);
+ gp_Vec aN = aV1 ^ aV2;
+
+ if (sense)
+ aN = -aN;
+
+ GC_MakeCircle circ (aP1, aN, aRad);
+ Handle(Geom_Circle) aGeomCirc = circ.Value();
+
+ GC_MakeArcOfCircle arc (aGeomCirc->Circ(), aP2, aP3, Standard_True);
+ aShape = BRepBuilderAPI_MakeEdge(arc).Edge();
+ } else if ( aType == ELLIPSE_ARC_CENTER_TWO_PNT ) { // ELLIPSE_ARC_CENTER_TWO_PNT
+ if ( aP1.Distance(aP2) <= aP1.Distance(aP3) ) {
+ // Standard_ConstructionError::Raise("Arc creation aborted: the distance from Center Point to Point 1 needs to be bigger than the distance from Center Point to Point 2");
+ cout << "aP1.Distance(aP2) <= aP1.Distance(aP3)" << endl;
+ gp_Pnt aTmpP = aP2;
+ aP2 = aP3;
+ aP3 = aTmpP;
+ }
+
+ GC_MakeEllipse ellipse (aP2, aP3, aP1);
+ Handle(Geom_Ellipse) aGeomEllipse = ellipse.Value();
+
+ gp_Vec aV1 (aP1, aP2);
+ gp_Vec aV2 (aP1, aP3);
+
+ double alpha = fabs(aV1.Angle(aV2));
+
+ GC_MakeArcOfEllipse arc (aGeomEllipse->Elips(), aP2, aP3, Standard_True);
+ aShape = BRepBuilderAPI_MakeEdge(arc).Edge();
+ }