about Geom_Curve

Hi everybody,

Handle(Geom_Curve) curve = BRep_Tool::Curve(Edge,First,Last);

if Edge is not null,but curve is null.
what is the problem?

Best Regards,

François Lauzon's picture

Your edge might be a 2d edge only (curve on surface), so that's why you can't extract 3d curve information from it. But if you really want to know what's the problem, use your debugger and step into the BRep_Tool:Curve method to see what is happenning.

Good Luck,

water's picture

Thanks a lot,

If the edge doesn't have 3d curve information,can we make the reference to it?

Best Regards,

LI's picture

Hi, I have the "edge" on the "face". I'd like to make another edge "edge1" that is the same as the "edge", but OCC doesn't work. Do you have a good idea?

Handle(Geom_Surface) gsrf=BRep_Tool::Surface(face);
Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(edge,face,aFirst,aLast);
TopoDS_Edge edge1=BRepBuilderAPI_MakeEdge(aC2D,face1);