View Issue Details

IDProjectCategoryView StatusLast Update
0024959Open CASCADEOCCT:Modeling Datapublic2015-02-19 16:38
Reporteroan Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024959: GCPnts_TangentialDeflection does not implement functionality by its meaning in case of BSpline with local splash
DescriptionThis bug can be reproduced using shape from 0024127 (see Steps to reproduce for this issue, case 1). BRepMesh uses GCPnts_TangentialDeflection internally to discretize edges using specified parameters of linear and angular deflection.

GCPnts_TangentialDeflection divides curve on intervals which number is defined as Max( 3, MinimumOfPoints ).
However, it does not check N-th point due to condition within lines 277-296:
Du = (lastu-firstu)/NbPoints;
MiddleU = firstu + Du;
for (i = 2; i < NbPoints; i++) {
  ...
  MiddleU += Du;
}

For instance, in case of NbPoints == 3 it skips end-points of a curve as well as the point forming the last interval.
Changing "i = 2" to "i = 1" as a solution is quite fine in context of 0024127. However, this will not solve the problem in general.

The point is that BSpline curve can be approximated by two points only (see screenshot) in case if it contains local splash lying within intervals defined by reference points (see Steps to reproduce for this issue, case 2).

As far as GCPnts_TangentialDeflection internally checks type of the given curve, I suppose that it would be logical also to use parameters of curve, for instance knots, as reference points instead of ones obtained by dividing on equal intervals.
Steps To Reproduce#case 1 (bug 24127)
bsplinesurf s 2 4 0.0 3 0.34 1 0.67 1 1.0 3 1 2 0.0 2 1.0 2 10 0 0 1 6 0 0 1 4 0 0 1 2 0 0 1 0 0 0 1 10 5 0 1 6 5 0 1 4 5 0 1 1.5 9 0 1 0 5 0 1
mkface f s
incmesh f 1
trinfo f

#This shape contains 2 triangles.
# 4 nodes.
#Maximal deflection 0.65883450744480032



#case 2
bsplinesurf s 2 12 0.0 3 0.1 1 0.2 1 0.3 1 0.4 1 0.5 1 0.525 1 0.55 1 0.575 1 0.8 1 0.9 1 1.0 3 1 2 0.0 2 1.0 2 16 0 0 1 14 0 0 1 12 0 0 1 10 0 0 1 8 0 0 1 6 0 0 1 4 0 0 1 2 0 0 1 0 0 0 1 -2 0 0 1 -4 0 0 1 -6 0 0 1 -8 0 0 1 16 5 0 1 14 5 0 1 12 5 0 1 10 5 0 1 8 5 0 1 6 5 0 1 4 5 0 1 1.5 9 0 1 0 5 0 1 -2 5 0 1 -4 5 0 1 -6 5 0 1 -8 5 0 1
mkface f s
incmesh f 1
trinfo f

#This shape contains 2 triangles.
# 4 nodes.
#Maximal deflection 0.081581701644800386
TagsNo tags attached.
Test case numberbugs moddata_3(013) bug24959_1, bug24959_2

Attached Files

  • BSpline_with_local_splash_(Case2).png (5,807 bytes)

Relationships

related to 0024127 closedbugmaster Community Mesh generated with BRepMesh_FastDiscret does not reflect a deflection setting 
related to 0023886 closedbugmaster Community Visualizing planar faces with "notches" depends heavily on the deflection coefficient 
related to 0025569 closedbugmaster Open CASCADE Tests 24959_1 and 24959_2 are not correct 

Activities

oan

2014-05-26 15:16

developer  

BSpline_with_local_splash_(Case2).png (5,807 bytes)

git

2014-07-17 12:13

administrator   ~0030220

Branch CR24959_1 has been created by jgv.

SHA-1: 29a7ac7baf6797f884c986939ebfec11c7c9a196

jgv

2014-07-17 12:15

developer   ~0030221

Please review the branch CR24959_1.

ifv

2014-07-17 16:45

developer   ~0030235

Ok

git

2014-07-18 14:24

administrator   ~0030243

Branch CR24959_1 has been updated forcibly by mkv.

SHA-1: 7e25aee25d5774286562ce8b62f60b5f520c1b79

mkv

2014-07-21 15:10

tester   ~0030266

Dear BugMaster,

Branch CR24959_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 7e25aee25d5774286562ce8b62f60b5f520c1b79

Number of compiler warnings:

occt component :
Linux: 16 (15 on master)
Windows: 1 (0 on master)
MacOS: 196 (193 on master)

There is new additional warning on Windows platform:
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/job/mnt-CR24959_1-master_build_occt_windows/1/warnings30Result/
gcpnts_tangentialdeflection.gxx:324, MSBuild, Priority: Normal
potentially uninitialized local variable 'param' used

There is compilation error on Linux and Windows platforms:

http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24959_1/job/mnt-CR24959_1-master_build_occt_products_linux/1/parsed_console/
../../../../src/AcisData/AcisData_MakeCurve.cxx:120: error: no matching function for call to ‘GCPnts_TangentialDeflection::Initialize(const Adaptor3d_Curve&, double, double)’

http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/CR24959_1/job/mnt-CR24959_1-master_build_occt_products_windows/1/parsed_console/
3>..\..\..\src\AcisData\AcisData_MakeCurve.cxx(120): error C2664: 'void GCPnts_TangentialDeflection::Initialize(Adaptor3d_Curve &,const Standard_Real,const Standard_Real,const Standard_Integer,const Standard_Real)' : cannot convert parameter 1 from 'const Adaptor3d_Curve' to 'Adaptor3d_Curve &'

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24959-1-master-occt/Debian60-64/bugs/moddata_3/bug24959_1.html
http://occt-tests/CR24959-1-master-occt/Windows-32-VC10/bugs/moddata_3/bug24959_1.html
bugs moddata_3(013) bug24959_1: OK

http://occt-tests/CR24959-1-master-occt/Debian60-64/bugs/moddata_3/bug24959_2.html
http://occt-tests/CR24959-1-master-occt/Windows-32-VC10/bugs/moddata_3/bug24959_2.html
bugs moddata_3(013) bug24959_2: OK

Testing on Linux:
Total MEMORY difference: 352238484 / 351968492
Total CPU difference: 48732.91999999999 / 46305.24

Testing on Windows:
Total MEMORY difference: 238923952 / 239178976
Total CPU difference: 31115.578125 / 35090.328125

There are no differences in images found by testdiff.

git

2014-07-21 15:11

administrator   ~0030267

Branch CR24959_1 has been updated by mkv.

SHA-1: e84c79ea2f413ed39a71c71ae3181b65ff06442a

git

2014-07-24 15:16

administrator   ~0030412

Branch CR24959_2 has been created by jgv.

SHA-1: efe64ac4005019480fe7542b402ac2cf61d46c87

jgv

2014-07-24 15:30

developer   ~0030414

The branches CR24959_2 and CR24959_2_products are ready for testing.

mkv

2014-07-25 14:40

tester   ~0030422

Dear BugMaster,

Branch CR24959_2 from occt git-repository and CR24959_2_products from products git-repository are compiled on Linux, MacOS and Windows platforms and tested.

Number of compiler warnings:

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

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24959-2-CR24959-2-occt/Debian60-64/bugs/moddata_3/bug24959_1.html
http://occt-tests/CR24959-2-CR24959-2-occt/Windows-32-VC10/bugs/moddata_3/bug24959_1.html
bugs moddata_3(013) bug24959_1: OK

http://occt-tests/CR24959-2-CR24959-2-occt/Debian60-64/bugs/moddata_3/bug24959_2.html
http://occt-tests/CR24959-2-CR24959-2-occt/Windows-32-VC10/bugs/moddata_3/bug24959_2.html
bugs moddata_3(013) bug24959_2: OK

Testing on Linux:
Total MEMORY difference: 351240696 / 351968492
Total CPU difference: 46987.63000000006 / 46305.24

Testing on Windows:
Total MEMORY difference: 239356376 / 239171960
Total CPU difference: 33576.8125 / 35090.21875

There are following differences in images found by testdiff.
http://occt-tests/CR24959-2-CR24959-2-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR24959-2-CR24959-2-occt/Windows-32-VC10/diff-Windows-32-VC10.html
IMAGE bugs vis bug23984: bug23984_Driver1_Viewer1_View1.png differs

git

2014-07-25 14:41

administrator   ~0030423

Branch CR24959_2 has been updated by mkv.

SHA-1: 561bcf6e286b74d028341c14a2e8258bf64f4d69

git

2014-08-21 19:02

administrator   ~0031014

Branch CR24959_3 has been created by jgv.

SHA-1: c70538c645fdc9f64920c4cab4614041b623df99


Detailed log of new commits:

Author: jgv
Date: Thu Aug 21 19:02:28 2014 +0400

    0024959: GCPnts_TangentialDeflection does not implement functionality by its meaning in case of BSpline with local splash

jgv

2014-08-21 19:14

developer   ~0031016

The branches CR24959_3 and CR24959_3_products are ready for testing.

git

2014-08-22 20:31

administrator   ~0031055

Branch CR24959_3 has been updated forcibly by mkv.

SHA-1: f6203ad6641a5f9714c66a9318ef277142c2ba09

mkv

2014-08-26 10:55

tester   ~0031079

Dear BugMaster,

Branch CR24959_3 from occt git-repository and CR24959_3_products from products git-repository was compiled on Linux and Windows platforms and tested.
SHA-1: f6203ad6641a5f9714c66a9318ef277142c2ba09
SHA-1: 14c5896f608c200fbf4eb79b83c76f1a9a58d06e

Number of compiler warnings:

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

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24959-3-CR24959-3-occt/Debian60-64/bugs/moddata_3/bug24959_1.html
http://occt-tests/CR24959-3-CR24959-3-occt/Windows-32-VC10/bugs/moddata_3/bug24959_1.html
bugs moddata_3(013) bug24959_1: OK
http://occt-tests/CR24959-3-CR24959-3-occt/Debian60-64/bugs/moddata_3/bug24959_2.html
http://occt-tests/CR24959-3-CR24959-3-occt/Windows-32-VC10/bugs/moddata_3/bug24959_2.html
bugs moddata_3(013) bug24959_2: OK

Testing on Linux:
occt component :
Total MEMORY difference: 353435528 / 353284436
Total CPU difference: 45929.55000000016 / 44482.93000000008
products component :
Total MEMORY difference: 110066400 / 110151972
Total CPU difference: 18348.24000000001 / 17587.009999999977

Testing on Windows:
occt component :
Total MEMORY difference: 240777588 / 241078036
Total CPU difference: 36701.75 / 40204.234375
products component :
Total MEMORY difference: 66432120 / 66474236
Total CPU difference: 13276.90625 / 15955.59375

There are following differences in images found by testdiff.
http://occt-tests/CR24959-3-CR24959-3-products/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR24959-3-CR24959-3-products/Windows-32-VC10/diff-Windows-32-VC10.html
IMAGE sat read B8: B8.png differs
IMAGE sat read_parallel_1 B8: B8.png differs

git

2014-08-26 10:55

administrator   ~0031080

Branch CR24959_3 has been updated by mkv.

SHA-1: c1273597d4d3a6fa8ca5c3128705d4b0fa47f33a


Detailed log of new commits:

Author: mkv
Date: Tue Aug 26 10:54:06 2014 +0400

    Test cases for issue CR24959

git

2014-09-16 14:17

administrator   ~0031752

Branch CR24959_4 has been created by aml.

SHA-1: 252f077410765e78d1b1ed40a60d7d4b25afa48e


Detailed log of new commits:

Author: jgv
Date: Thu Aug 21 19:02:28 2014 +0400

    0024959: GCPnts_TangentialDeflection does not implement functionality by its meaning in case of BSpline with local splash
    
    In GCPnts_TangetialDeflection curve divided in C_N intervals on which sample points (still 3) is computed.
    New version works over all curve types except GeomAbs_OtherCurves on which fixed points number.
    
    Test cases for issue CR24959

aml

2014-09-16 14:19

developer   ~0031753

Dear abv,

Please check current state of branches CR24959_4 (OCCT repository) and CR24959_4_products (Products repository).

git

2014-09-17 15:06

administrator   ~0031808

Branch CR24959_4 has been updated forcibly by aml.

SHA-1: 0be8b129578b5ab6c6f3f5eb7f01872850c58f1f

abv

2014-09-17 16:06

manager   ~0031813

Please avoid changing signature of GCPnts_TangentialDeflection constructors (accepting Curve as non-const), this is not logical (as this class does not change the input curve) and leads to having adaptors copied in a few places in the current patch. Instead, I suggest to use const_cast<> when calling methods NbIntervals() and Intervals() of the curve. The rationale is that logically these methods should have been const, as the fields that they change (when they do) are just a cache and do not change logical state of the object.

I propose that we should register separate issue for making methods (Nb)Intervals() const. (It is not worth changing this in context of this issue.)

git

2014-09-18 08:09

administrator   ~0031841

Branch CR24959_4 has been updated forcibly by aml.

SHA-1: 6c0b29e780d10bdfaeb9ab356280bf9908fdf9ea

aml

2014-09-18 08:27

developer   ~0031842

Dear abv,

Patch has been changed in proposed way. Please review. (CR24959_4 and CR24959_4_Products branches)

git

2014-09-18 10:11

administrator   ~0031846

Branch CR24959_4 has been updated forcibly by aml.

SHA-1: 3ad4ff8ffb0296b155dbfb7de290818b9ee5e04a

abv

2014-09-19 19:23

manager   ~0031925

Well, reviewed, please test...

Actually I still have some doubts regarding use of parameter minNbPnts:

- the condition to add new points is "if (minNbPnts > 2)" -- this seemed correct when we had single interval, but now this will lead to adding all checked points (NbIntervals * 2 or more), which is unlikely needed

- the use of this parameter to define NbPoints becomes inconsistent for this case (linear curve): it thus defines number of points per each interval and not the whole curve as in other cases

git

2014-09-22 09:15

administrator   ~0031928

Branch CR24959_4 has been updated forcibly by mkv.

SHA-1: 1ef3633bbbde6a159a64b808bf8c41070ff98d33

mkv

2014-09-22 18:03

tester   ~0031959

Dear BugMaster,
Branch CR24959_4 from occt git-repository and CR24959_4from products git-repository was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 1ef3633bbbde6a159a64b808bf8c41070ff98d33
SHA-1: 8163e411adcd4f704a2053cd0a9d690faea93acf

Number of compiler warnings:

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

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24959-4-CR24959-4-occt/Debian60-64/bugs/moddata_3/bug24959_1.html
http://occt-tests/CR24959-4-CR24959-4-occt/Windows-32-VC10/bugs/moddata_3/bug24959_1.html
bugs moddata_3(013) bug24959_1: OK

http://occt-tests/CR24959-4-CR24959-4-occt/Debian60-64/bugs/moddata_3/bug24959_2.html
http://occt-tests/CR24959-4-CR24959-4-occt/Windows-32-VC10/bugs/moddata_3/bug24959_2.html
bugs moddata_3(013) bug24959_2: OK

Testing on Linux:
occt component :
Total MEMORY difference: 355868152 / 355454572
Total CPU difference: 45783.52000000003 / 44817.36000000009
products component :
Total MEMORY difference: 110295168 / 110250572
Total CPU difference: 18460.009999999984 / 18358.06999999999

Testing on Windows:
occt component :
Total MEMORY difference: 242842200 / 242267280
Total CPU difference: 35571.515625 / 34303.3125
products component :
Total MEMORY difference: 66632520 / 66591984
Total CPU difference: 10691.296875 / 11913.0625

There are no differences in images found by testdiff.

git

2014-09-30 11:35

administrator   ~0032403

Branch CR24959_1 has been deleted by inv.

SHA-1: e84c79ea2f413ed39a71c71ae3181b65ff06442a

git

2014-09-30 11:35

administrator   ~0032404

Branch CR24959_2 has been deleted by inv.

SHA-1: 561bcf6e286b74d028341c14a2e8258bf64f4d69

git

2014-09-30 11:35

administrator   ~0032405

Branch CR24959_3 has been deleted by inv.

SHA-1: c1273597d4d3a6fa8ca5c3128705d4b0fa47f33a

git

2014-09-30 11:35

administrator   ~0032406

Branch CR24959_4 has been deleted by inv.

SHA-1: 1ef3633bbbde6a159a64b808bf8c41070ff98d33

Related Changesets

occt: master d2388a81

2014-08-21 15:02:28

jgv


Committer: bugmaster Details Diff
0024959: GCPnts_TangentialDeflection does not implement functionality by its meaning in case of BSpline with local splash

In GCPnts_TangetialDeflection curve divided in C_N intervals on which sample points (still 3) is computed.

Test cases for issue CR24959
Affected Issues
0024959
mod - src/GCPnts/GCPnts_TangentialDeflection.gxx Diff File
add - tests/bugs/moddata_3/bug24959_1 Diff File
add - tests/bugs/moddata_3/bug24959_2 Diff File

Issue History

Date Modified Username Field Change
2014-05-26 15:16 oan New Issue
2014-05-26 15:16 oan Assigned To => ifv
2014-05-26 15:16 oan File Added: BSpline_with_local_splash_(Case2).png
2014-05-26 15:17 oan Relationship added related to 0024127
2014-05-26 16:24 oan Relationship added related to 0023886
2014-05-29 11:51 ifv Assigned To ifv => aml
2014-05-29 11:51 ifv Status new => assigned
2014-07-07 13:31 ifv Assigned To aml => jgv
2014-07-17 12:13 git Note Added: 0030220
2014-07-17 12:15 jgv Note Added: 0030221
2014-07-17 12:15 jgv Status assigned => resolved
2014-07-17 12:15 jgv Assigned To jgv => ifv
2014-07-17 16:45 ifv Note Added: 0030235
2014-07-17 16:45 ifv Status resolved => reviewed
2014-07-18 14:24 git Note Added: 0030243
2014-07-18 14:31 mkv Assigned To ifv => mkv
2014-07-21 15:10 mkv Note Added: 0030266
2014-07-21 15:11 git Note Added: 0030267
2014-07-21 15:11 mkv Test case number => bugs moddata_3(013) bug24959_1, bug24959_2
2014-07-21 15:11 mkv Assigned To mkv => jgv
2014-07-21 15:11 mkv Status reviewed => assigned
2014-07-24 15:16 git Note Added: 0030412
2014-07-24 15:30 jgv Note Added: 0030414
2014-07-24 15:30 jgv Status assigned => resolved
2014-07-24 15:31 jgv Status resolved => reviewed
2014-07-24 15:31 jgv Assigned To jgv => mkv
2014-07-25 14:40 mkv Note Added: 0030422
2014-07-25 14:41 git Note Added: 0030423
2014-07-25 14:41 mkv Assigned To mkv => jgv
2014-07-25 14:41 mkv Status reviewed => assigned
2014-08-21 19:02 git Note Added: 0031014
2014-08-21 19:14 jgv Note Added: 0031016
2014-08-21 19:14 jgv Status assigned => resolved
2014-08-21 19:14 jgv Status resolved => reviewed
2014-08-21 19:15 jgv Assigned To jgv => mkv
2014-08-22 20:31 git Note Added: 0031055
2014-08-26 10:55 mkv Note Added: 0031079
2014-08-26 10:55 git Note Added: 0031080
2014-08-26 10:56 mkv Assigned To mkv => jgv
2014-08-26 10:56 mkv Status reviewed => feedback
2014-09-11 11:14 abv Target Version => 6.8.0
2014-09-16 09:31 abv Assigned To jgv => aml
2014-09-16 14:17 git Note Added: 0031752
2014-09-16 14:19 aml Note Added: 0031753
2014-09-16 14:19 aml Assigned To aml => abv
2014-09-16 14:19 aml Status feedback => resolved
2014-09-17 15:06 git Note Added: 0031808
2014-09-17 16:06 abv Note Added: 0031813
2014-09-17 16:06 abv Assigned To abv => aml
2014-09-17 16:06 abv Status resolved => assigned
2014-09-18 08:09 git Note Added: 0031841
2014-09-18 08:27 aml Note Added: 0031842
2014-09-18 08:27 aml Status assigned => resolved
2014-09-18 08:27 aml Assigned To aml => abv
2014-09-18 10:11 git Note Added: 0031846
2014-09-19 19:23 abv Note Added: 0031925
2014-09-19 19:23 abv Assigned To abv => bugmaster
2014-09-19 19:23 abv Status resolved => reviewed
2014-09-22 09:06 mkv Assigned To bugmaster => mkv
2014-09-22 09:15 git Note Added: 0031928
2014-09-22 18:03 mkv Note Added: 0031959
2014-09-22 18:04 mkv Assigned To mkv => bugmaster
2014-09-22 18:04 mkv Status reviewed => tested
2014-09-26 14:49 bugmaster Changeset attached => occt master d2388a81
2014-09-26 14:49 bugmaster Status tested => verified
2014-09-26 14:49 bugmaster Resolution open => fixed
2014-09-30 11:35 git Note Added: 0032403
2014-09-30 11:35 git Note Added: 0032404
2014-09-30 11:35 git Note Added: 0032405
2014-09-30 11:35 git Note Added: 0032406
2014-11-11 12:44 aiv Fixed in Version => 6.8.0
2014-11-11 12:59 aiv Status verified => closed
2014-12-09 09:16 aml Relationship added related to 0025569