Trimming a Circle in OpenNURBS

Hello,

I am using OpenNURBS in C++ and I am unable to figure out how to trim a circle at two points.

ON_3dPoint PS(Somepoint);
ON_3dPoint SS(Somepoint);
LE=ON_Circle((PS+SS)/2,PS.DistanceTo(SS)/2);
ON_ArcCurve CLE=LE;
ON_3dPoint Start=(PS+SS)/2-PS;
ON_3dPoint End=(PS+SS)/2-SS;
CLE.SetStartPoint(PS);
CLE.SetStartPoint(SS);

I would be glad if someone can provide me with some feedback.

Thanks in advance :slight_smile:

Hi @Nitish_Anand,

To trim a curve using openNURBS, use ON_TrimCurve.

Here is an example:

– Dale