Hi All,

I am having a few problems using the GeomAPI_Interpolate class. I have included a snapshot of my code below. The problem is that inside the interpolate class the field variable myIsDone is always false so I assume something is wrong with the data passed to the constructor. Could somebody please help.

Thanks in advance


......... .........

// Create two Geom_CartesianPoint's

Handle(Geom_CartesianPoint) cpt1,cpt2;


// Get the gp_Pnt's from these Geom_CartesianPoint's

gp_Pnt gp_pnt1 = cpt1->Pnt(); gp_Pnt gp_pnt2 = cpt2->Pnt();

// Create a TColgp_HArray1OfPnt object which contains the gp_Pnt's to interpolate.

Handle(TColgp_HArray1OfPnt) points = new TColgp_HArray1OfPnt(1,2);

// Set the values.

points->SetValue(1,gp_pnt1); points->SetValue(2,gp_pnt2);

// Create an interpolation object.

Standard_Boolean periodic = false; Standard_Real tolerance = 1.0e-7;

try {

GeomAPI_Interpolate interpolate(points,periodic,tolerance);

// Assign the curve from the interpolate object

// This raises an exception.....

// also interpolate.IsDone() returns false

crv1 = interpolate.Curve(); }

catch (Standard_Failure) {

// The error ?? is caught here ! }

Igor Feoktistov's picture


perhaps you forgot to call method Perform()?


s-bulman's picture

Yep, sorry to waste your time.

Thanks Simon