For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Arc and curve

Anonymous's picture
Forums: 

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); }

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.