How to create an arc

Can anyone help me in creating an arc.

I am creating circle by,
gp_Pnt rad_xypos(l_gpPnt.X(),l_gpPnt.Y(),0);
gp_Dir dir(l_gpPnt.X(),l_gpPnt.Y(),l_gpPnt.Z());
gp_Ax2 axis(rad_xypos,dir);
Handle(Geom_Circle) Geomcirc1 = new Geom_Circle(C1);
Handle(AIS_Circle) circle1 = new AIS_Circle(Geomcirc1);
m_haisContext->Display(circle1,Standard_True);

I want to create an arc from the circle mentioned above. After creation how to display the arc.

Thanks & Regards
Vidhyan

Roman Lygin's picture

Hi Vidhyan,

I'd consider displaying curves with the help of edges and respectively AIS_Shape. This will give you all the flexibility:

TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge (Geomcirc1, aU1, aU2);
Handle(AIS_Shape) anAISEdge = new AIS_Shape (anEdge);
m_haisContext->Display(anAISEdge,Standard_True);

Hope this helps.
Roman

---
opencascade.blogspot.com - blog on Open CASCADE

Vidhyan's picture

Thanks a lot Roman Lygin. It helped me a lot

Vidhyan's picture

On a mouse click i am drawing a circle of radius 10. but how to find the aU1 and aU2 in the circle then only we can able to draw the arc right.

Regards
Vidhyan

Maili's picture

If you have start and end points of arc, you can project them to circle to find aU1 and aU2
GeomAPI_ProjectPointOnCurve::LowerDistaceParameter()

Vidhyan's picture

Maili. Thanks for your Reply.

Now i am able to create the arc