#### View Issue Details

ID Project Category View Status Date Submitted Last Update 0027112 Community OCCT:Modeling Algorithms public 2016-01-25 20:22 2023-08-14 17:26 Roman Lygin akaftasev normal major assigned open 6.9.1 Unscheduled 0027112: GeomAPI_Interpolate produces wrong result Apparently GeomAPI_Interpolate tries to compute a curve using cubic spline interpolation. However it seems to incorrectly compute first and last tangents, leading to result which can be significantly far from expected. Enclosed is the screenshot of the interpolation of a curve specified via its points and approximate expected result (in blue). The source data are from a Parasolid file which contains a set of points used to define an interpolation curve and vertices an edge lying on this curve passes through. Edge vertices are shown as cubes. Open CASCADE computes first tangent calling PLib::EvalLagrange() which returns a vector lo (3.64055896 1.24782193 0.351508766). However if to compute a vector lg using formula from Golavanov's book "Geometric modeling" as: q0 = 3/2 (p1-p0)/(t1-t0) - 1/2 q1, where t0 and t1 are parameters (0 and 29.73384) p0 and p1 are first two points q0 and q1 are derivatives at points p0 and p1 respectively, q1=p0*(t1-t2)/((t0-t1)(t0-t2)) + p1 (2t1-t0-t2)/((t1-t0)(t1-t2))+ p2(t1-t0)/((t2-t0)(t2-t1)). lg is (-0.013074235, -0.993197391, -0.279352588) which is much closer to expected. Perhaps the bug is in broken logic in BuildTangents() in GeomAPI_Interpolate.cxx which computes tangents at first and last points. Severity is set to major as this affects data correctness of the interpolation algorithm which is a core one in OCC. A fix is left for discretion of the OCC team. Perhaps any modification may lead to significant test failures and update of the reference base. pload MODELING interpol c points.txt #compare visually and some property (e.g. length) with the expected result #test bugs moddata_3 bug27112_1 #test bugs moddata_3 bug27112_2 #test bugs moddata_3 bug27112_3 #test bugs moddata_3 bug27112_4 # No shapes needed - public available No tags attached.

#### Attached Files

 points.txt (776 bytes) interpolated.png (27,389 bytes) interpolated_expected.png (23,298 bytes) interpolated_tangents.png (21,963 bytes) interpolated_result_with_explicit_boundary_tangents.png (19,211 bytes)

#### Issue History

2016-01-25 20:22 Roman Lygin New Issue
2016-01-25 20:22 Roman Lygin Assigned To => msv
2016-01-25 20:22 Roman Lygin File Added: points.txt
2016-01-25 20:22 Roman Lygin File Added: interpolated.png
2016-01-25 20:23 Roman Lygin File Added: interpolated_expected.png
2016-01-25 20:25 Roman Lygin File Added: interpolated_tangents.png
2016-01-27 10:32 Roman Lygin File Added: interpolated_result_with_explicit_boundary_tangents.png
2016-01-27 10:47 Roman Lygin Note Added: 0050148
2016-01-28 14:01 msv Assigned To msv => aml
2016-01-28 14:01 msv Status new => assigned
2016-02-07 10:05 git Note Added: 0050455
2016-02-09 14:38 git Note Added: 0050525
2016-02-09 14:43 git Note Added: 0050527
2016-02-09 14:52 git Note Added: 0050531
2016-02-10 16:02 aml Note Added: 0050582
2016-02-10 16:02 aml Assigned To aml => Roman Lygin
2016-02-10 16:02 aml Status assigned => feedback
2016-02-10 16:03 aml Note Edited: 0050582
2016-02-10 17:36 Roman Lygin Note Added: 0050593
2016-02-10 17:38 Roman Lygin Note Edited: 0050593
2016-02-10 17:44 aml Note Added: 0050594
2016-02-13 09:02 Roman Lygin Note Added: 0050716
2016-02-13 09:02 Roman Lygin Assigned To Roman Lygin => aml
2016-02-13 09:02 Roman Lygin Status feedback => assigned
2016-02-15 17:50 aml Note Added: 0050770
2016-02-16 10:11 abv Note Added: 0050794
2016-02-19 13:25 git Note Added: 0051012
2016-02-20 07:37 git Note Added: 0051033
2016-02-20 10:02 git Note Added: 0051034
2016-02-20 10:04 aml Note Added: 0051035
2016-02-20 10:04 aml Assigned To aml => msv
2016-02-20 10:04 aml Status assigned => resolved
2016-02-20 10:04 aml Steps to Reproduce Updated
2016-02-20 17:08 Roman Lygin Note Added: 0051045
2016-02-20 18:01 msv Note Added: 0051046
2016-02-20 18:01 msv Assigned To msv => aml
2016-02-20 18:01 msv Status resolved => assigned
2016-02-24 08:09 git Note Added: 0051068
2016-02-24 08:39 git Note Added: 0051069
2016-02-24 11:16 git Note Added: 0051072
2016-02-24 11:21 aml Note Added: 0051074
2016-02-24 11:21 aml Assigned To aml => msv
2016-02-24 11:21 aml Status assigned => resolved
2016-02-24 11:21 aml Steps to Reproduce Updated
2016-02-24 14:26 aml Note Edited: 0051074
2016-02-24 15:32 msv Note Added: 0051084
2016-02-24 15:32 msv Assigned To msv => aml
2016-02-24 15:32 msv Status resolved => assigned
2016-02-24 20:50 Roman Lygin Note Added: 0051092
2016-02-25 08:46 git Note Added: 0051094
2016-02-25 08:49 aml Note Added: 0051095
2016-02-25 08:49 aml Assigned To aml => msv
2016-02-25 08:49 aml Status assigned => resolved
2016-03-23 10:26 aml Note Added: 0051866
2016-03-23 10:26 aml Assigned To msv => aml
2016-03-23 10:26 aml Status resolved => assigned
2016-10-28 16:32 msv Target Version 7.1.0 => 7.2.0
2017-07-21 11:34 msv Target Version 7.2.0 => 7.3.0
2017-12-05 17:09 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:44 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:55 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:52 msv Target Version 7.6.0 => 7.7.0
2022-10-24 10:42 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:08 dpasukhi Target Version 7.8.0 => Unscheduled
2023-08-14 17:25 dpasukhi Assigned To aml => akaftasev
2023-08-14 17:26 dpasukhi Note Added: 0113976