Arc and curve

Hi,
Can anybody tell me the best way to draw an ARC in a 3D OCC window. I have origin point, start angle,sweep angle,primary & secondary axis length.

Also, if I have an array of vertices how can I draw a curve passing through them?

Thanks in advance,
Amod

Stephane Routelous's picture

Hi,

>> Also, if I have an array of vertices how can I draw a curve passing through them?

use the GeomAPI_PointsToBSpline class

Ivan P's picture

void CommonGraphicsHandler::drawPlainArc(double positionX, double positionY, double angle1, double angle2, double radius) {
gp_Circ theAbstractCircle;
theAbstractCircle.SetRadius(radius);
gp_Pnt circleCenter(positionX,(double)0.0, positionY);
theAbstractCircle.SetLocation(circleCenter);
Handle(Geom_TrimmedCurve) geometricArc = GC_MakeArcOfCircle(theAbstractCircle, (Standard_Real)angle1, (Standard_Real)angle2,(Standard_Boolean)true);
TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(geometricArc);
Handle(AIS_Shape) FinalEdge = new AIS_Shape(aEdge1);
privateAISContext->Display(FinalEdge, true); }