View Issue Details

IDProjectCategoryView StatusLast Update
0028594CommunityOCCT:Modeling Algorithmspublic2017-09-29 16:25
Reporterdevocctgp Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028594: Geom2dAPI_Interpolate generated curve is not the same as proe
DescriptionGeom2dAPI_Interpolate generated curve is not the same as proe, please check the picture
Steps To ReproduceHandle(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);
TagsNo tags attached.
Test case numberbugs modalg_6 bug28594

Attached Files

  • QQ截图20170326225650.png (7,408 bytes)
  • QQ截图20170326225733.png (9,266 bytes)
  • not_scaled.PNG (8,555 bytes)

Activities

devocctgp

2017-03-26 18:11

developer  

QQ截图20170326225650.png (7,408 bytes)

devocctgp

2017-03-26 18:11

developer  

QQ截图20170326225733.png (9,266 bytes)

msv

2017-03-27 11:12

developer   ~0064708

Last edited: 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.

msv

2017-03-27 11:12

developer  

not_scaled.PNG (8,555 bytes)

devocctgp

2017-03-27 11:25

developer   ~0064710

ok, add it, i checked and saw the 3d interplote has the scale parameter, but 2d has not,

git

2017-03-29 18:30

administrator   ~0064789

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

imn

2017-03-29 18:33

developer   ~0064790

Dear Mikhail, could you please review CR28594.

msv

2017-03-30 10:17

developer   ~0064794

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).

git

2017-03-30 11:39

administrator   ~0064795

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

imn

2017-03-30 11:41

developer   ~0064797

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)")

msv

2017-04-03 11:23

developer   ~0064851

Reviewed.

git

2017-04-03 12:53

administrator   ~0064855

Branch CR28594 has been updated forcibly by mkv.

SHA-1: 969ed08b9189b97939ebf138e252807ab0a5d78b

mkv

2017-04-04 14:44

tester   ~0064890

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.

mkv

2017-04-04 14:45

tester   ~0064891

Dear BugMaster,
Branch CR28594 is TESTED.

git

2017-05-12 11:36

administrator   ~0065942

Branch CR28594 has been deleted by kgv.

SHA-1: 969ed08b9189b97939ebf138e252807ab0a5d78b

Related Changesets

occt: master 353e6fa0

2017-03-29 15:28:33

imn


Committer: bugmaster Details Diff
0028594: Geom2dAPI_Interpolate generated curve is not the same as proe

Boolean flag "Scale" has been added for methods "Load" in "Geom2dAPI_Interpolate" class
Affected Issues
0028594
mod - src/Geom2dAPI/Geom2dAPI_Interpolate.cxx Diff File
mod - src/Geom2dAPI/Geom2dAPI_Interpolate.hxx Diff File
mod - src/QABugs/QABugs_20.cxx Diff File
add - tests/bugs/modalg_6/bug28594 Diff File

Issue History

Date Modified Username Field Change
2017-03-26 18:11 devocctgp New Issue
2017-03-26 18:11 devocctgp Assigned To => msv
2017-03-26 18:11 devocctgp File Added: QQ截图20170326225650.png
2017-03-26 18:11 devocctgp File Added: QQ截图20170326225733.png
2017-03-27 11:12 msv Note Added: 0064708
2017-03-27 11:12 msv File Added: not_scaled.PNG
2017-03-27 11:13 msv Note Edited: 0064708
2017-03-27 11:13 msv Note Edited: 0064708
2017-03-27 11:14 msv Assigned To msv => devocctgp
2017-03-27 11:14 msv Status new => feedback
2017-03-27 11:25 devocctgp Note Added: 0064710
2017-03-27 11:26 devocctgp Assigned To devocctgp => msv
2017-03-28 17:40 msv Assigned To msv => imn
2017-03-28 17:40 msv Status feedback => assigned
2017-03-29 18:30 git Note Added: 0064789
2017-03-29 18:33 imn Assigned To imn => msv
2017-03-29 18:33 imn Note Added: 0064790
2017-03-29 18:37 imn Status assigned => resolved
2017-03-30 10:17 msv Note Added: 0064794
2017-03-30 10:17 msv Assigned To msv => imn
2017-03-30 10:17 msv Status resolved => assigned
2017-03-30 11:39 git Note Added: 0064795
2017-03-30 11:41 imn Note Added: 0064797
2017-03-30 11:41 imn Assigned To imn => msv
2017-03-30 11:41 imn Status assigned => resolved
2017-04-03 11:23 msv Note Added: 0064851
2017-04-03 11:23 msv Assigned To msv => bugmaster
2017-04-03 11:23 msv Status resolved => reviewed
2017-04-03 12:53 git Note Added: 0064855
2017-04-03 16:51 mkv Assigned To bugmaster => mkv
2017-04-04 14:44 mkv Note Added: 0064890
2017-04-04 14:45 mkv Note Added: 0064891
2017-04-04 14:45 mkv Assigned To mkv => bugmaster
2017-04-04 14:45 mkv Status reviewed => tested
2017-04-04 14:45 mkv Test case number => bugs modalg_6 bug28594
2017-04-14 14:28 bugmaster Changeset attached => occt master 353e6fa0
2017-04-14 14:28 bugmaster Status tested => verified
2017-04-14 14:28 bugmaster Resolution open => fixed
2017-05-12 11:36 git Note Added: 0065942
2017-09-29 16:19 aiv Fixed in Version => 7.2.0
2017-09-29 16:25 aiv Status verified => closed
The file specified in $g_log_destination "/var/log/mantis/bugs/LDAP.log" is not writable.