Wed, 02/25/2009 - 09:25
Forums:
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
Thu, 02/26/2009 - 18:45
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
Mon, 03/02/2009 - 07:12
Thanks a lot Roman Lygin. It helped me a lot
Mon, 03/02/2009 - 08:38
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
Mon, 03/02/2009 - 13:27
If you have start and end points of arc, you can project them to circle to find aU1 and aU2
GeomAPI_ProjectPointOnCurve::LowerDistaceParameter()
Mon, 03/02/2009 - 13:39
Maili. Thanks for your Reply.
Now i am able to create the arc