
Tue, 08/23/2011 - 12:19
Forums:
Hi,
I need to convert an Edge to a Geom_Curve. I did that and there are not compilation error :
Handle(Geom_Curve) myCurve = BRep_Tool::Curve(myEdge, First, Last);
gp_Pnt aPnt = myCurve->Value(First);
When I execute the program I have an error on this last line.
How to judge if a Geom_Curve object is ceated successfully
Can someone help me.
Thanks in advance,
Thu, 08/25/2011 - 16:21
Hi,
BRep_Tool::Curve() returns null handle if curve has not been created, so you should simply add the following check after the curve creation:
if (!myCurve.IsNull())
{
...
}
Best regards,
Eugine.