
Mon, 02/21/2005 - 13:35
Forums:
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
Mon, 02/21/2005 - 13:43
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
Thu, 02/09/2006 - 17:30
Hi,
"GeomAbs_Circle" includes also arc of circle description. Then if your curve is an arc, it's not closed.
Kreshnik HASANI
Fri, 02/10/2006 - 12:31
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