MantisBT - Community
View Issue Details
0028594Community[OCCT] OCCT:Modeling Algorithmspublic2017-03-26 18:112017-09-29 16:25
devocctgp 
bugmaster 
normalminor 
closedfixed 
 
[OCCT] 7.2.0[OCCT] 7.2.0 
bugs modalg_6 bug28594
0028594: Geom2dAPI_Interpolate generated curve is not the same as proe
Geom2dAPI_Interpolate generated curve is not the same as proe, please check the picture
Handle(TColgp_HArray1OfPnt2d) points_2d = new TColgp_HArray1OfPnt2d(1, 6);;
(*points_2d)(1) = gp_Pnt2d(-30.4, 8);
(*points_2d)(2) = gp_Pnt2d(-16.689912, 17.498217);
(*points_2d)(3) = gp_Pnt2d(-23.803064, 24.748543);
(*points_2d)(4) = gp_Pnt2d(-16.907466, 32.919615);
(*points_2d)(5) = gp_Pnt2d(-8.543829, 26.549421);
(*points_2d)(6) = gp_Pnt2d(0, 39.200000);

TColgp_Array1OfVec2d tangent_2d(1, 6);
(tangent_2d)(1) = gp_Vec2d(0.3, 0.4);
(tangent_2d)(2) = gp_Vec2d(0, 0);
(tangent_2d)(3) = gp_Vec2d(0, 0);
(tangent_2d)(4) = gp_Vec2d(0, 0);
(tangent_2d)(5) = gp_Vec2d(0, 0);
(tangent_2d)(6) = gp_Vec2d(1, 0);

Handle(TColStd_HArray1OfBoolean) tangent_flags = new TColStd_HArray1OfBoolean(1, 6);
(*tangent_flags)(1) = true;
(*tangent_flags)(2) = false;
(*tangent_flags)(3) = false;
(*tangent_flags)(4) = false;
(*tangent_flags)(5) = false;
(*tangent_flags)(6) = true;

Geom2dAPI_Interpolate interp_2d(points_2d, Standard_False, Precision::Confusion());
interp_2d.Load(tangent_2d, tangent_flags);
interp_2d.Perform();

Handle(Geom2d_BSplineCurve) curve_2d = interp_2d.Curve();

Handle(Geom_Curve) result = GeomAPI::To3d(curve_2d, _work_pln);

TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(result);
No tags attached.
png QQ截图20170326225650.png (7,408) 2017-03-26 18:11
https://tracker.dev.opencascade.org/
png QQ截图20170326225733.png (9,266) 2017-03-26 18:11
https://tracker.dev.opencascade.org/
png not_scaled.PNG (8,555) 2017-03-27 11:12
https://tracker.dev.opencascade.org/
Issue History
2017-03-26 18:11devocctgpNew Issue
2017-03-26 18:11devocctgpAssigned To => msv
2017-03-26 18:11devocctgpFile Added: QQ截图20170326225650.png
2017-03-26 18:11devocctgpFile Added: QQ截图20170326225733.png
2017-03-27 11:12msvNote Added: 0064708
2017-03-27 11:12msvFile Added: not_scaled.PNG
2017-03-27 11:13msvNote Edited: 0064708bug_revision_view_page.php?bugnote_id=64708#r16293
2017-03-27 11:13msvNote Edited: 0064708bug_revision_view_page.php?bugnote_id=64708#r16294
2017-03-27 11:14msvAssigned Tomsv => devocctgp
2017-03-27 11:14msvStatusnew => feedback
2017-03-27 11:25devocctgpNote Added: 0064710
2017-03-27 11:26devocctgpAssigned Todevocctgp => msv
2017-03-28 17:40msvAssigned Tomsv => imn
2017-03-28 17:40msvStatusfeedback => assigned
2017-03-29 18:30gitNote Added: 0064789
2017-03-29 18:33imnAssigned Toimn => msv
2017-03-29 18:33imnNote Added: 0064790
2017-03-29 18:37imnStatusassigned => resolved
2017-03-30 10:17msvNote Added: 0064794
2017-03-30 10:17msvAssigned Tomsv => imn
2017-03-30 10:17msvStatusresolved => assigned
2017-03-30 11:39gitNote Added: 0064795
2017-03-30 11:41imnNote Added: 0064797
2017-03-30 11:41imnAssigned Toimn => msv
2017-03-30 11:41imnStatusassigned => resolved
2017-04-03 11:23msvNote Added: 0064851
2017-04-03 11:23msvAssigned Tomsv => bugmaster
2017-04-03 11:23msvStatusresolved => reviewed
2017-04-03 12:53gitNote Added: 0064855
2017-04-03 16:51mkvAssigned Tobugmaster => mkv
2017-04-04 14:44mkvNote Added: 0064890
2017-04-04 14:45mkvNote Added: 0064891
2017-04-04 14:45mkvAssigned Tomkv => bugmaster
2017-04-04 14:45mkvStatusreviewed => tested
2017-04-04 14:45mkvTest case number => bugs modalg_6 bug28594
2017-04-14 14:28bugmasterChangeset attached => occt master 353e6fa0
2017-04-14 14:28bugmasterStatustested => verified
2017-04-14 14:28bugmasterResolutionopen => fixed
2017-05-12 11:36gitNote Added: 0065942
2017-09-29 16:19aivFixed in Version => 7.2.0
2017-09-29 16:25aivStatusverified => closed

Notes
(0064708)
msv   
2017-03-27 11:12   
(edited on: 2017-03-27 11:13)
The algorithm Geom2dAPI_Interpolate scales input tangents so that they have the length of the size of the derivative of the lagrange interpolation. I have tried to skip this scaling and got the result as in the picture not_scaled.png.
We can make a Boolean parameter of the algorithm that defines whether scaling is needed.

(0064710)
devocctgp   
2017-03-27 11:25   
ok, add it, i checked and saw the 3d interplote has the scale parameter, but 2d has not,
(0064789)
git   
2017-03-29 18:30   
Branch CR28594 has been created by imn.

SHA-1: a658e25c2c5613dc8203f1432e08d8f53797893f


Detailed log of new commits:

Author: imn
Date: Wed Mar 29 18:28:33 2017 +0300

    0028594: Geom2dAPI_Interpolate generated curve is not the same as proe
    
    - Added boolean flag "Scale" for methods "Load" in "Geom2dAPI_Interpolate" class
(0064790)
imn   
2017-03-29 18:33   
Dear Mikhail, could you please review CR28594.
(0064794)
msv   
2017-03-30 10:17   
Remarks:

src\Geom2dAPI\Geom2dAPI_Interpolate.hxx
- Put more detailed description of parameter:
boolean flag defining whether tangent vectors are to be scaled according to derivatives of lagrange interpolation.
- Make modified lines shorter (up to 90-100 characters).

tests\bugs\modalg_6\bug28594
- replace 'v2d' with 'smallview -2D-' to obtain less size snapshots.
- the last argument '0' in 'diffimage' is extra (it is in place of output file).
(0064795)
git   
2017-03-30 11:39   
Branch CR28594 has been updated by imn.

SHA-1: 7790005fe2023a65710d08fc600aa6679df4240e


Detailed log of new commits:

Author: imn
Date: Thu Mar 30 11:39:02 2017 +0300

    Remarks correction

(0064797)
imn   
2017-03-30 11:41   
Dear Mikhail, could you please review CR28594, branch is updated according to remarks. If I understand correctly diffimage does't have extra argument ("File1 File2 tolerance blackWhite(1|0) borderFilter(1|0)")
(0064851)
msv   
2017-04-03 11:23   
Reviewed.
(0064855)
git   
2017-04-03 12:53   
Branch CR28594 has been updated forcibly by mkv.

SHA-1: 969ed08b9189b97939ebf138e252807ab0a5d78b
(0064890)
mkv   
2017-04-04 14:44   
Dear BugMaster,
Branch CR28594 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 969ed08b9189b97939ebf138e252807ab0a5d78b

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1206

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28594-master-OCCT/Debian70-64/bugs/modalg_6/bug28594.html [^]
http://occt-tests/CR28594-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug28594.html [^]
bugs modalg_6 bug28594: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91682779 / 91343957 [+0.37%]
Total CPU difference: 19938.400000000285 / 19612.98000000024 [+1.66%]
products component :
Total MEMORY difference: 30818714 / 30770563 [+0.16%]
Total CPU difference: 5404.339999999976 / 5358.419999999984 [+0.86%]
Testing on Windows:
occt component :
Total MEMORY difference: 57857858 / 57855806 [+0.00%]
Total CPU difference: 18547.380092698506 / 18063.40259029849 [+2.68%]
products component :
Total MEMORY difference: 22295363 / 22257195 [+0.17%]
Total CPU difference: 5423.359164899979 / 5313.206858799958 [+2.07%]

There are no differences in images found by testdiff.
(0064891)
mkv   
2017-04-04 14:45   
Dear BugMaster,
Branch CR28594 is TESTED.
(0065942)
git   
2017-05-12 11:36   
Branch CR28594 has been deleted by kgv.

SHA-1: 969ed08b9189b97939ebf138e252807ab0a5d78b