View Issue Details

IDProjectCategoryView StatusLast Update
0027087CommunityOCCT:Modeling Algorithmspublic2020-12-02 17:11
ReporterBenjaminBihler Assigned Tobugmaster  
PriorityhighSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2012 
Product Version7.0.0 
Target Version7.5.0Fixed in Version7.5.0 
Summary0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
DescriptionI have an example where an edge pierces through a shell, but BRepExtrema_DistShapeShape states the distance was 0.00760306. This is definitely wrong, the distance is zero.

It seems as if such errors happened especially, if an edge pierces through another edge with is the boundary of a face of the shell.
Steps To ReproduceTest case

bugs modalg_7 bug27087

Test uses input file bug27087.brep (attached)
TagsNo tags attached.
Test case numberbugs/modalg_7/bug27087

Attached Files

  • Distance.stp (229,973 bytes)
  • bug27087.brep (9,221,501 bytes)

Activities

BenjaminBihler

2016-01-18 15:44

developer  

Distance.stp (229,973 bytes)

BenjaminBihler

2016-05-09 10:08

developer   ~0053915

I have tried the following to spot the error:
- played with BRepExtrema_DistShapeShape deflection values -> nothing changes
- changed the BRepExtrema_DistShapeShape algorithm -> nothing changes
- computed the distance of connectingEdge in my example code to every face and every edge of shellSurface -> I get no smaller value than 0.00760306

Therefore it seems to me, that BRepExtrema_DistShapeShape really computes the point pair with minimum distance, but somehow they are not computed precise enough. It misses the real minimum a little bit.

Is there anything more I can do to support your search for this error?

abv

2016-05-09 11:44

manager  

bug27087.brep (9,221,501 bytes)

abv

2016-05-09 11:49

manager   ~0053916

Last edited: 2016-05-09 11:50

I confirm the problem (also tested in OCCT 6.8, 6.9.1). Here are steps to reproduce in DRAW (use file bug27087 attached):

pload MODELING
restore [locate_data_file bug27087.brep] a
explode a
distmini r a_1 a_2
if { [dval r_val] > 0.0001 } { puts "Error: too big deviation, should be 0!" }

The reported distance 0.0076 is actually the value computed between a_1 and boundary edge of a_2.
To see that curve (a_1, geometrically a line) actually does intersect a face (a_2, 20-th face from original model), show it in viewer and zoom:

pload VISUALIZATION
incmesh a 0.001
vdisplay a

aml

2016-05-10 15:02

developer   ~0053951

The problem is inside of extrema Curve / Surface algorithm which does not take into account surface / curve complexity.
Number of samples is always 10 or 13 (for line curve too - 10 samples, instead of 3).

The proposed solution is to make number of samples adaptive according to the objects complexity.

This case is regression to 6.7.1.

David Austin

2016-07-01 06:14

reporter   ~0055625

I have this issue too. Sphere to shape distances that should be reported as
zero are reported as a (random) small positive number.

git

2019-09-03 15:52

administrator   ~0086692

Branch CR27087 has been created by ifv.

SHA-1: 1d51d5e1e43832834943f5c0a402aef633db6510


Detailed log of new commits:

Author: ifv
Date: Tue Sep 3 15:48:24 2019 +0300

    0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
    
    Extrema_ExtCs.cxx: adaptive choice of samples is implemented;
    Test case added.

git

2019-09-05 12:30

administrator   ~0086790

Branch CR27087 has been updated forcibly by ifv.

SHA-1: c03da185831e611bae31180db29563eba625e2b3

git

2019-09-06 15:33

administrator   ~0086889

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 312382b0282f34e357524d0dd747c22def3a1bfc

git

2019-09-06 15:35

administrator   ~0086890

Branch CR27087 has been updated forcibly by ifv.

SHA-1: cb50503a247f1f57d5ccdd258d9c8d080e3a239d

git

2019-09-09 14:58

administrator   ~0086982

Branch CR27087 has been updated forcibly by ifv.

SHA-1: d6a7073af908d98e3ba957b7d8a154a7deee1b56

git

2019-09-10 16:51

administrator   ~0086992

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 0499e7ae5a604f0f45bb0d7d1c8dcbddbe86c199

git

2019-09-17 17:51

administrator   ~0087212

Branch CR27087 has been updated forcibly by ifv.

SHA-1: b7955a54e10d16d68363f4d82ed0e0d57b2cafaf

git

2019-09-20 17:16

administrator   ~0087372

Branch CR27087 has been updated by ifv.

SHA-1: 69ac71d8bd375bddf1f3d223ced87535f06cd2e0


Detailed log of new commits:

Author: ifv
Date: Fri Sep 20 17:12:21 2019 +0300

    Fix regressions 2

git

2019-09-27 17:20

administrator   ~0087580

Branch CR27087 has been updated forcibly by ifv.

SHA-1: c92827306becaf34b99860b3424f6a5fa1f42871

git

2019-09-30 17:21

administrator   ~0087641

Branch CR27087 has been updated forcibly by ifv.

SHA-1: b5787631f5745191fc12720ef91852920e6ef944

git

2020-02-28 11:11

administrator   ~0090715

Branch CR27087 has been deleted by ifv.

SHA-1: b5787631f5745191fc12720ef91852920e6ef944

git

2020-02-28 11:13

administrator   ~0090716

Branch CR27087 has been created by ifv.

SHA-1: 49d85cf62d69535f7557019314573d750859939c


Detailed log of new commits:

Author: ifv
Date: Tue Sep 3 15:48:24 2019 +0300

    0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
    
    Extrema_ExtCs.cxx: adaptive choice of samples is implemented;
    Test case added.

git

2020-03-02 15:16

administrator   ~0090765

Branch CR27087 has been updated forcibly by ifv.

SHA-1: db98ed14daee874765158afd0ecc42f38303fb05

git

2020-03-03 15:45

administrator   ~0090798

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 4d592111afc2b3258f4ccdd033ea74589e1f7bba

git

2020-03-05 16:30

administrator   ~0090838

Branch CR27087 has been updated forcibly by ifv.

SHA-1: ab50c46942d7e34eb85f43c4de3db991c404507b

git

2020-03-13 15:16

administrator   ~0090928

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 6b8500cb17b9807cbd9e737b2d7cf74a53d3bb8f

git

2020-03-23 15:02

administrator   ~0091197

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 8695b2e2c881bfbfc226aec6e37e3a308287017a

git

2020-03-24 12:34

administrator   ~0091211

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 83e0dd298abb222c2fb20816ebc3f66ef9faea90

ifv

2020-03-24 15:55

developer   ~0091220

Branch CR27087 is ready for review

msv

2020-03-26 14:40

developer   ~0091270

I have put the attached shape into database (triangulation removed).

IMAGE bugs modalg_7 bug29900: bug29900.png differs
This difference seems to be a regression, like some sections becoming not computed. Could you analyze?

There are many regressions on performance. Can we avoid them?
CPU boolean bsection M8: 12.32 / 5.06 [+143.48%]
CPU boolean bsection N4: 515.27 / 269.91 [+90.90%]
CPU boolean bsection N5: 163.42 / 84.24 [+93.99%]
CPU boolean bsection M9: 33.9 / 13.85 [+144.77%]
CPU boolean bsection N6: 30.47 / 13.58 [+124.37%]
CPU boolean bsection N7: 269.8 / 126.59 [+113.13%]
CPU bugs modalg_7 bug27908: 3.2 / 0.87 [+267.82%]
CPU bugs modalg_6 bug28165_2: 9.33 / 3.73 [+150.13%]
CPU bugs modalg_6 bug27878_4: 29.59 / 14.01 [+111.21%]

git

2020-04-14 17:11

administrator   ~0091546

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 33a9ad8fa8d84b7d7599f696b8d02797e0523405

git

2020-04-14 17:34

administrator   ~0091547

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 0a5474cc6ae28098da9075f252ee2ccbf002744d

git

2020-04-15 18:10

administrator   ~0091560

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 0d9ab30151d49db7305fc6e3637b21a158b5e4ba

git

2020-04-16 13:31

administrator   ~0091590

Branch CR27087 has been updated by ifv.

SHA-1: 7f7e674729fa45bba211249a8fc5100900f4ece9


Detailed log of new commits:

Author: ifv
Date: Thu Apr 16 13:31:41 2020 +0300

    Revert all main changes

Author: ifv
Date: Thu Apr 16 10:45:06 2020 +0300

    Revert last commit

git

2020-04-16 16:10

administrator   ~0091595

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 708897d0b1b72a91aebcdabb95e5206495eef867

git

2020-04-17 08:36

administrator   ~0091604

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 6aa532fd6b29b0b21f134a702444e09593655ee4

ifv

2020-04-17 10:35

developer   ~0091612

Branch CR27087 is ready for review
This patch fixes 29839 too.

git

2020-05-12 18:24

administrator   ~0092076

Branch CR27087 has been updated forcibly by ifv.

SHA-1: a386f0d6fb0a67f25b5f8ccbde1ccea309aa7492

ifv

2020-05-13 08:49

developer   ~0092082

Branch CR27087 is rebased on current
master and tested and ready for review

emv

2020-05-14 09:15

developer   ~0092098

Sorry to interfere, I just noticed that the commit message does not correspond to the actual modifications:
Commit message states:
"tests/bugs/modalg_7/bug29580_1, tests/bugs/modalg_7/bug29900 : test are modified according to new behavior of algorithms"
While modified is only one test case: tests/bugs/modalg_5/bug25232_8

git

2020-05-14 09:22

administrator   ~0092099

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 91445588c64eac58a304614a4b8647ec04228c82

ifv

2020-05-14 09:25

developer   ~0092101

Thanks emv.
Commit message is updated according to actual state of commit.

jgv

2020-05-14 11:11

developer   ~0092104

Reviewed.

Branches for integration:
OCCT – CR27087
Products – NOT

bugmaster

2020-05-15 11:08

administrator   ~0092130

Combination -
OCCT branch : WEEK-20
master SHA - d9eb6aca8789e6b8ff6742e3ad60a4dadf0cd37e
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-20 SHA - eb85b0feb479f67f3a505bcb285922a288149f74
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: 17146.6200000001 / 17177.020000000186 [-0.18%]
Products
Total CPU difference: 11178.21000000009 / 11272.470000000078 [-0.84%]
Windows-64-VC14:
OCCT
Total CPU difference: 18609.671875 / 18646.015625 [-0.19%]
Products
Total CPU difference: 13007.71875 / 13180.21875 [-1.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-05-16 14:21

administrator   ~0092182

Branch CR27087 has been deleted by inv.

SHA-1: 91445588c64eac58a304614a4b8647ec04228c82

Related Changesets

occt: master 79aa9b5c

2019-09-03 12:48:24

ifv


Committer: bugmaster Details Diff
0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result

Extrema_ExtCs.cxx: number of subdivision is incresed for curve;

Modifications to fix regressions of some tests
IntTools_BeanFaceIntersector.cxx: restriction of curve, which is used in Extrema_ExtCS
ProjLib_CompProjectedCurve.cxx: tolerance is reduced for Extrema_ExtCS
BRepOffset_Tool.cxx: checking common vertex if it is Null

tests/bugs/modalg_7/bug27087 : test case added.

tests/bugs/modalg_5/bug25232_8 : test is modified according to new behavior of algorithms
Affected Issues
0027087
mod - src/BRepOffset/BRepOffset_Tool.cxx Diff File
mod - src/Extrema/Extrema_ExtCS.cxx Diff File
mod - src/IntTools/IntTools_BeanFaceIntersector.cxx Diff File
mod - src/ProjLib/ProjLib_CompProjectedCurve.cxx Diff File
mod - tests/bugs/modalg_5/bug25232_8 Diff File
add - tests/bugs/modalg_7/bug27087 Diff File

Issue History

Date Modified Username Field Change
2016-01-18 15:44 BenjaminBihler New Issue
2016-01-18 15:44 BenjaminBihler Assigned To => abv
2016-01-18 15:44 BenjaminBihler File Added: Distance.stp
2016-01-18 15:56 abv Assigned To abv => msv
2016-01-18 15:56 abv Category OCCT:Foundation Classes => OCCT:Modeling Algorithms
2016-05-09 10:08 BenjaminBihler Note Added: 0053915
2016-05-09 11:44 abv File Added: bug27087.brep
2016-05-09 11:49 abv Note Added: 0053916
2016-05-09 11:50 abv Note Edited: 0053916
2016-05-10 09:41 msv Assigned To msv => aml
2016-05-10 09:41 msv Status new => assigned
2016-05-10 14:54 msv Summary BRepExtrema_DistShapeShape gives wrong result => [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
2016-05-10 15:02 aml Note Added: 0053951
2016-07-01 06:14 David Austin Note Added: 0055625
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-10-09 11:39 abv Priority normal => high
2017-12-05 17:08 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:37 msv Target Version 7.4.0 => 7.5.0
2019-09-02 16:13 msv Assigned To aml => ifv
2019-09-02 16:13 msv Target Version 7.5.0 => 7.4.0
2019-09-03 15:52 git Note Added: 0086692
2019-09-05 12:30 git Note Added: 0086790
2019-09-06 15:33 git Note Added: 0086889
2019-09-06 15:35 git Note Added: 0086890
2019-09-09 14:58 git Note Added: 0086982
2019-09-10 16:51 git Note Added: 0086992
2019-09-17 17:51 git Note Added: 0087212
2019-09-20 17:16 git Note Added: 0087372
2019-09-25 22:08 abv Target Version 7.4.0 => 7.5.0
2019-09-27 17:20 git Note Added: 0087580
2019-09-30 17:21 git Note Added: 0087641
2020-02-28 11:11 git Note Added: 0090715
2020-02-28 11:13 git Note Added: 0090716
2020-03-02 15:16 git Note Added: 0090765
2020-03-03 15:45 git Note Added: 0090798
2020-03-05 16:30 git Note Added: 0090838
2020-03-13 15:16 git Note Added: 0090928
2020-03-23 15:02 git Note Added: 0091197
2020-03-24 12:34 git Note Added: 0091211
2020-03-24 15:55 ifv Note Added: 0091220
2020-03-24 15:55 ifv Assigned To ifv => msv
2020-03-24 15:55 ifv Status assigned => resolved
2020-03-24 15:55 ifv Steps to Reproduce Updated
2020-03-26 14:40 msv Note Added: 0091270
2020-03-26 14:40 msv Assigned To msv => ifv
2020-03-26 14:40 msv Status resolved => assigned
2020-04-14 17:11 git Note Added: 0091546
2020-04-14 17:34 git Note Added: 0091547
2020-04-15 18:10 git Note Added: 0091560
2020-04-16 13:31 git Note Added: 0091590
2020-04-16 16:10 git Note Added: 0091595
2020-04-17 08:36 git Note Added: 0091604
2020-04-17 10:35 ifv Note Added: 0091612
2020-04-17 10:35 ifv Assigned To ifv => msv
2020-04-17 10:35 ifv Status assigned => resolved
2020-05-12 18:24 git Note Added: 0092076
2020-05-12 18:26 ifv Assigned To msv => ifv
2020-05-12 18:26 ifv Status resolved => assigned
2020-05-13 08:49 ifv Note Added: 0092082
2020-05-13 08:49 ifv Assigned To ifv => jgv
2020-05-13 08:49 ifv Status assigned => resolved
2020-05-14 09:15 emv Note Added: 0092098
2020-05-14 09:22 git Note Added: 0092099
2020-05-14 09:25 ifv Note Added: 0092101
2020-05-14 11:11 jgv Note Added: 0092104
2020-05-14 11:11 jgv Assigned To jgv => bugmaster
2020-05-14 11:11 jgv Status resolved => reviewed
2020-05-15 11:08 bugmaster Note Added: 0092130
2020-05-15 11:08 bugmaster Status reviewed => tested
2020-05-15 11:09 bugmaster Test case number => bugs/modalg_7/bug27087
2020-05-16 14:07 bugmaster Changeset attached => occt master 79aa9b5c
2020-05-16 14:07 bugmaster Status tested => verified
2020-05-16 14:07 bugmaster Resolution open => fixed
2020-05-16 14:21 git Note Added: 0092182
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:11 emo Status verified => closed