You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter bioan
- Start date

`gp_Circ`

entity contains its placement and radius, but not parametric ranges. You are supposed to construct the `Geom_Circle`

out of it, and trim this curve, e.g., with `Geom_TrimmedCurve`

or by constructing an edge. Do you know the extremity points of your arc? If so, you might be asking how to get the angle from the known 3D points, but otherwise, it is always 360 degrees for the `gp_Circ`

entity.Anyway, if you share some more context, it will be easier to answer.

I try to tessellate an arc which is constructed starting from its base circle and the angle of the arc expressed in radians.

I managed the resolve the arc value, but now I have a problem of construction when the value is a negative one.

This is my code:

double firstParam = 0;gp_Pnt P1, P2;

double lastParam = arcAngleInRadians;

double Step = (10* 2 * PI) / 360; // tessellate the arc with 10 degree step

double param = 0;

P1 = ElCLib::Value(firstParam, myArc);

for (param = firstParam+Step; param < lastParam; param += Step)

{

_ArcTessalatePoints->AddVertex(P1.X(), P1.Y(), P1.Z());

P2 = ElCLib::Value(param, myArc);

_ArcTessalatePoints->AddVertex(P2.X(), P2.Y(), P2.Z());

P1 = P2;

}

This code is ok for a positive arc angle value, but when the value of the arc angle is negative the arc is constructed in the opposite side of it's center.

Any advice and suggestions are welcome and much appreciated!