OCC的 gce_xxx类库的类,相关就是计算gp_xxx的,其中gce_MakeCirc2d有构造函数传入三个点计算出circle。
class gce_Root
{
Standard_Boolean IsDone()
}
class gce_MakeCirc2d...gce_Root
{
...
gce_MakeCirc2d(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3);
...
const gp_Circ2d& Value()...
}
一般使用如下
gce_MakeCirc2d mk(p1,p2,p3);
if(mk.IsDone())
{
auto center=mk.Value().Location();
auto r=mk.Value().Radius();
}