View Issue Details

IDProjectCategoryView StatusLast Update
0030874CommunityOCCT:Modeling Algorithmspublic2021-04-06 12:39
Reporterdrazmyslovich Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.4.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0030874: Modeling Algorithms - GCPnts_TangentialDeflection inserts the points between nearby points
DescriptionGCPnts_TangentialDeflection is able to infinitely insert the points
Steps To ReproduceUnfortunately, I have no example curve to reproduce the problem.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0032265 closedbugmaster Modeling Algorithms - some trivial code improvements in CSLib_Class2d and GCPnts_TangentialDeflection 

Activities

git

2019-08-07 15:12

administrator   ~0086065

Branch CR30874 has been created by drazmyslovich.

SHA-1: 496afeb5eb2361cf34dc8162c9a0eda1af3f85b4


Detailed log of new commits:

Author: drazmyslovich
Date: Wed Aug 7 14:10:32 2019 +0200

    0030874: GCPnts_TangentialDeflection - check the points distance before inserting a new point in between

drazmyslovich

2019-08-07 15:13

developer   ~0086066

The proposed solution is submitted, please, review

oan

2019-08-07 18:40

developer   ~0086073

Dear Mikhail,

could you please manage the issue.

msv

2019-08-08 09:57

developer   ~0086083

Dear Eugeny, please review it.

emv

2019-08-12 14:14

developer   ~0086184

Hello Dima,

Is this bug reproduced on any of your data, confidential or public? Because, looking into the code I see that the points will not be inserted infinitely as you suggest. The conditions
if (umax - U1 > uTol && U2 - umax > uTol)
{
  if (P1.SquareDistance(MiddlePoint) > MinLen2 && P2.SquareDistance(MiddlePoint) > MinLen2)
  {
    // insert point
  }
}

are actually stronger than yours.

However, I agree that early check such as you implemented should be inserted, but the criterion instead of gp::Resolution() should be uTol for parametric tolerance and MinLen2 for square distance between nearby points.

git

2019-08-15 14:24

administrator   ~0086263

Branch CR30874 has been updated by drazmyslovich.

SHA-1: 33eb19e6143e3a4a66e576ebded5df20b651e524


Detailed log of new commits:

Author: drazmyslovich
Date: Thu Aug 15 13:22:23 2019 +0200

    0030874: Use uTol and MinLen2 values as threshold

drazmyslovich

2019-08-15 14:27

developer   ~0086264

Dear Eugeny,

I have adjusted the code according to your comments.
I will try to find an example data to reproduce the original problem.

Regards,
Dima

git

2019-08-15 14:33

administrator   ~0086265

Branch CR30874_1 has been created by emv.

SHA-1: eafdde15470f51ddcb369e338671b464abf4bfb6


Detailed log of new commits:

Author: drazmyslovich
Date: Wed Aug 7 15:10:32 2019 +0300

    0030874: GCPnts_TangentialDeflection inserts the points between nearby points
    
    Check the points distance before inserting a new point in between.

emv

2019-08-15 14:34

developer   ~0086266

Hello Dima, thanks for the update. I have squashed the commits and going to initiate certification of the patch.

git

2019-08-16 09:09

administrator   ~0086269

Branch CR30874_1 has been updated forcibly by emv.

SHA-1: 4e41a26ff42d07429eef7ce11712e2823257e77c

emv

2019-08-16 09:13

developer   ~0086270

There was a misprint in the patch that has not been noticed, but tests revealed. Instead of condition U2-U1<uTol, there was U1-U2<uTol which was always true and points have never been inserted. I've corrected it and re-run the tests.

kgv

2019-08-16 13:32

developer   ~0086278

Last edited: 2019-08-16 13:33

> However, I agree that early check such as you implemented should be inserted,
Are you sure this is correct check for 3D points?

From my understanding, this might prevent inserting points on curve having a local splash - e.g. two checked points are indeed very close to each other, while point in the middle might have greater distance to both.

emv

2019-08-16 13:53

developer   ~0086279

You are right, the check for 3D points is incorrect and should be removed. Let's keep only parametric check.

drazmyslovich

2019-08-16 14:02

developer   ~0086280

Therefore I used in the original version gp::Resolution () as it helps to identify the points which are too close.

kgv

2019-08-16 14:13

developer   ~0086282

> Therefore I used in the original version gp::Resolution ()
> as it helps to identify the points which are too close.
For degenerate cases it is still incorrect checked distance between 2 points - the check for a middle point should be done, and it uses larger tolerance than gp::Resolution().

drazmyslovich

2019-08-16 14:20

developer   ~0086283

But if you have a degenerated case, then it makes no sense to proceed. Even worse if due to some other problems in generated case D0 will deliver a middle point, which is far away from the curve, then it will cause the algorithm to proceed instead of earlier bailing out.

kgv

2019-08-16 14:25

developer   ~0086284

> But if you have a degenerated case, then it makes no sense to proceed.
GCPnts_TangentialDeflection is not supposed to hide geometry issues.

git

2019-08-16 17:01

administrator   ~0086290

Branch CR30874_1 has been updated forcibly by emv.

SHA-1: 167464fbd4512e0a3b72faf4d29772d29f460561

git

2019-08-20 07:31

administrator   ~0086345

Branch CR30874_1 has been updated forcibly by emv.

SHA-1: a71ec8aee31763182f18b530e82f21a9c45e5f03

emv

2019-08-22 07:30

developer   ~0086390

Testing shows no regressions - http://jenkins-test-12.nnov.opencascade.com/view/CR30874-master-emv/view/COMPARE/

apn

2019-08-22 20:36

administrator   ~0086422

Combination -
OCCT branch : CR30874_1
master SHA - a71ec8aee31763182f18b530e82f21a9c45e5f03
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : master SHA - 32e882a7b3145a66baa739f965d275c822c0bd8a
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16087.120000000043 / 16105.290000000065 [-0.11%]
Products
Total CPU difference: 10477.740000000053 / 10484.700000000048 [-0.07%]
Windows-64-VC14:
OCCT
Total CPU difference: 18243.75 / 18149.296875 [+0.52%]
Products
Total CPU difference: 12061.359375 / 12045.34375 [+0.13%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2019-09-02 17:52

administrator   ~0086628

Branch CR30874 has been deleted by mnt.

SHA-1: 33eb19e6143e3a4a66e576ebded5df20b651e524

git

2019-09-02 18:00

administrator   ~0086629

Branch CR30874_1 has been deleted by apn.

SHA-1: a71ec8aee31763182f18b530e82f21a9c45e5f03

Related Changesets

occt: master 846245d4

2019-08-07 12:10:32

drazmyslovich


Committer: apn Details Diff
0030874: Modeling Algorithms - GCPnts_TangentialDeflection inserts the points between nearby points

Check the points distance before inserting a new point in between.
Affected Issues
0030874
mod - src/GCPnts/GCPnts_TangentialDeflection.pxx Diff File

Issue History

Date Modified Username Field Change
2019-08-07 15:02 drazmyslovich New Issue
2019-08-07 15:02 drazmyslovich Assigned To => oan
2019-08-07 15:03 drazmyslovich Assigned To oan => drazmyslovich
2019-08-07 15:12 git Note Added: 0086065
2019-08-07 15:13 drazmyslovich Note Added: 0086066
2019-08-07 15:13 drazmyslovich Assigned To drazmyslovich => oan
2019-08-07 15:13 drazmyslovich Status new => resolved
2019-08-07 18:39 oan Category OCCT:Mesh => OCCT:Modeling Algorithms
2019-08-07 18:40 oan Assigned To oan => msv
2019-08-07 18:40 oan Note Added: 0086073
2019-08-08 09:57 msv Note Added: 0086083
2019-08-08 09:57 msv Assigned To msv => emv
2019-08-12 14:14 emv Note Added: 0086184
2019-08-12 14:14 emv Assigned To emv => drazmyslovich
2019-08-12 14:14 emv Status resolved => feedback
2019-08-12 15:09 msv Target Version 7.4.0 => 7.5.0
2019-08-15 14:24 git Note Added: 0086263
2019-08-15 14:27 drazmyslovich Note Added: 0086264
2019-08-15 14:27 drazmyslovich Assigned To drazmyslovich => emv
2019-08-15 14:27 drazmyslovich Status feedback => resolved
2019-08-15 14:33 git Note Added: 0086265
2019-08-15 14:34 emv Note Added: 0086266
2019-08-15 18:57 kgv Summary GCPnts_TangentialDeflection inserts the points between nearby points => Modeling Algorithms - GCPnts_TangentialDeflection inserts the points between nearby points
2019-08-16 09:09 git Note Added: 0086269
2019-08-16 09:13 emv Note Added: 0086270
2019-08-16 13:32 kgv Note Added: 0086278
2019-08-16 13:33 kgv Note Edited: 0086278
2019-08-16 13:53 emv Note Added: 0086279
2019-08-16 14:02 drazmyslovich Note Added: 0086280
2019-08-16 14:13 kgv Note Added: 0086282
2019-08-16 14:20 drazmyslovich Note Added: 0086283
2019-08-16 14:25 kgv Note Added: 0086284
2019-08-16 17:01 git Note Added: 0086290
2019-08-20 07:31 git Note Added: 0086345
2019-08-22 07:30 emv Note Added: 0086390
2019-08-22 07:30 emv Assigned To emv => bugmaster
2019-08-22 07:30 emv Status resolved => reviewed
2019-08-22 20:36 apn Test case number => Not needed
2019-08-22 20:36 apn Note Added: 0086422
2019-08-22 20:36 apn Status reviewed => tested
2019-08-24 16:56 apn Changeset attached => occt master 846245d4
2019-08-24 16:56 apn Assigned To bugmaster => apn
2019-08-24 16:56 apn Status tested => verified
2019-08-24 16:56 apn Resolution open => fixed
2019-09-02 17:52 git Note Added: 0086628
2019-09-02 18:00 git Note Added: 0086629
2019-10-21 13:58 abv Target Version 7.5.0 => 7.4.0
2021-04-06 12:39 kgv Relationship added related to 0032265