Prod.: Engine, ver.: 6022, ID: 60001740, Bug : Interpolation of Point to a triangle returns wrong result

Bug : Interpolation of Point to a triangle returns wrong result

Article60001740
TypeBug
ProductEngine
Version6022
Date Added6/22/2012
FixedYes [6/22/2012]
Submitted byGraham Parker
Keywords

Subject

Interpolation of Point to a triangle returns wrong result

Summary


Interpolation of Point to a triangle returns wrong result

example:

 

gTriangle t = new gTriangle(

new gPoint(606298.804, 7654031.64, 2299.0),

new gPoint(606298.056, 7654031.368, 2297.0),

new gPoint(606298.831, 7654032.062, 2300.0)

);

gPoint pt = new gPoint(606298.3517599972D, 7654031.5019632708D, 0.0);

gPoint intercept = new gPoint(pt.x, pt.y, t.InterpolatePoint(pt));//return wrong z value


 

 

Solution

VectorDraw.Geometry.Globals.InterpolatePointInTriangle   and gTriangle.InterpolatePoint method was fixed in 6023