A Closed curve

Hi, All,
I have a problem to determine whether a space curve is closed or not. Would someone help me about it?

Handle(Geom_Crv) hCrv .... //it is expected to a circle
TopoDS_Edge E=BRepBuilderAPI_MakeEdge(hCrv,Vmin,Vmax,umin,umax);

BRepAdaptor_Curve aCurveAdaptor(E);
GeomAbs_CurveType aType=aCurveAdaptor.GetType();
if(aType==GeomAbs_Circle) std::cout if(aCurveAdaptor.IsClosed()) std::cout

The standard output shows that the result curve is a circle, but it doesn't show that it is closed! Stangely, since a circle is surely closed. Do you know the reason?

Thank you very much.

Ming

Ming_39674's picture

Add some remarks:

The curve hCrv comes from the intersection of a plane and a cylinder, while the cylinder might be considered as two faces. Is it the reason? If so, how to solve it?

Thanks.

Ming

Kreshnik's picture

Hi,

"GeomAbs_Circle" includes also arc of circle description. Then if your curve is an arc, it's not closed.

Kreshnik HASANI

Torsten Sadowski's picture

Hi,

I would suspect you have two half circles because many cad programs divide a cylinder into half faces. Maybe you must search for two connected circular arcs with connected ends and coincident centre.

Cheers, Torsten