MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027087Community[OCCT] OCCT:Modeling Algorithmspublic2016-01-18 15:442020-05-16 14:21
ReporterBenjaminBihler 
Assigned Tobugmaster 
PriorityhighSeverityminor 
StatusverifiedResolutionfixed 
PlatformWindowsOSVC++ 2012OS Version32bit
Product Version[OCCT] 7.0.0 
Target Version[OCCT] 7.5.0*Fixed in Version 
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? file icon Distance.stp (229,973 bytes) 2016-01-18 15:44
? file icon bug27087.brep (9,221,501 bytes) 2016-05-09 11:44

- Relationships

-  Notes
(0053915)
BenjaminBihler (developer)
2016-05-09 10:08

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?
(0053916)
abv (manager)
2016-05-09 11:49
edited on: 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

(0053951)
aml (developer)
2016-05-10 15:02

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.
(0055625)
David Austin (reporter)
2016-07-01 06:14

I have this issue too. Sphere to shape distances that should be reported as
zero are reported as a (random) small positive number.
(0086692)
git (administrator)
2019-09-03 15:52

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.
(0086790)
git (administrator)
2019-09-05 12:30

Branch CR27087 has been updated forcibly by ifv.

SHA-1: c03da185831e611bae31180db29563eba625e2b3
(0086889)
git (administrator)
2019-09-06 15:33

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 312382b0282f34e357524d0dd747c22def3a1bfc
(0086890)
git (administrator)
2019-09-06 15:35

Branch CR27087 has been updated forcibly by ifv.

SHA-1: cb50503a247f1f57d5ccdd258d9c8d080e3a239d
(0086982)
git (administrator)
2019-09-09 14:58

Branch CR27087 has been updated forcibly by ifv.

SHA-1: d6a7073af908d98e3ba957b7d8a154a7deee1b56
(0086992)
git (administrator)
2019-09-10 16:51

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 0499e7ae5a604f0f45bb0d7d1c8dcbddbe86c199
(0087212)
git (administrator)
2019-09-17 17:51

Branch CR27087 has been updated forcibly by ifv.

SHA-1: b7955a54e10d16d68363f4d82ed0e0d57b2cafaf
(0087372)
git (administrator)
2019-09-20 17:16

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

(0087580)
git (administrator)
2019-09-27 17:20

Branch CR27087 has been updated forcibly by ifv.

SHA-1: c92827306becaf34b99860b3424f6a5fa1f42871
(0087641)
git (administrator)
2019-09-30 17:21

Branch CR27087 has been updated forcibly by ifv.

SHA-1: b5787631f5745191fc12720ef91852920e6ef944
(0090715)
git (administrator)
2020-02-28 11:11

Branch CR27087 has been deleted by ifv.

SHA-1: b5787631f5745191fc12720ef91852920e6ef944
(0090716)
git (administrator)
2020-02-28 11:13

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.
(0090765)
git (administrator)
2020-03-02 15:16

Branch CR27087 has been updated forcibly by ifv.

SHA-1: db98ed14daee874765158afd0ecc42f38303fb05
(0090798)
git (administrator)
2020-03-03 15:45

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 4d592111afc2b3258f4ccdd033ea74589e1f7bba
(0090838)
git (administrator)
2020-03-05 16:30

Branch CR27087 has been updated forcibly by ifv.

SHA-1: ab50c46942d7e34eb85f43c4de3db991c404507b
(0090928)
git (administrator)
2020-03-13 15:16

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 6b8500cb17b9807cbd9e737b2d7cf74a53d3bb8f
(0091197)
git (administrator)
2020-03-23 15:02

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 8695b2e2c881bfbfc226aec6e37e3a308287017a
(0091211)
git (administrator)
2020-03-24 12:34

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 83e0dd298abb222c2fb20816ebc3f66ef9faea90
(0091220)
ifv (developer)
2020-03-24 15:55

Branch CR27087 is ready for review
(0091270)
msv (developer)
2020-03-26 14:40

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%]
(0091546)
git (administrator)
2020-04-14 17:11

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 33a9ad8fa8d84b7d7599f696b8d02797e0523405
(0091547)
git (administrator)
2020-04-14 17:34

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 0a5474cc6ae28098da9075f252ee2ccbf002744d
(0091560)
git (administrator)
2020-04-15 18:10

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 0d9ab30151d49db7305fc6e3637b21a158b5e4ba
(0091590)
git (administrator)
2020-04-16 13:31

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

(0091595)
git (administrator)
2020-04-16 16:10

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 708897d0b1b72a91aebcdabb95e5206495eef867
(0091604)
git (administrator)
2020-04-17 08:36

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 6aa532fd6b29b0b21f134a702444e09593655ee4
(0091612)
ifv (developer)
2020-04-17 10:35

Branch CR27087 is ready for review
This patch fixes 29839 too.
(0092076)
git (administrator)
2020-05-12 18:24

Branch CR27087 has been updated forcibly by ifv.

SHA-1: a386f0d6fb0a67f25b5f8ccbde1ccea309aa7492
(0092082)
ifv (developer)
2020-05-13 08:49

Branch CR27087 is rebased on current
master and tested and ready for review
(0092098)
emv (developer)
2020-05-14 09:15

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
(0092099)
git (administrator)
2020-05-14 09:22

Branch CR27087 has been updated forcibly by ifv.

SHA-1: 91445588c64eac58a304614a4b8647ec04228c82
(0092101)
ifv (developer)
2020-05-14 09:25

Thanks emv.
Commit message is updated according to actual state of commit.
(0092104)
jgv (developer)
2020-05-14 11:11

Reviewed.

Branches for integration:
OCCT – CR27087
Products – NOT
(0092130)
bugmaster (administrator)
2020-05-15 11:08

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
(0092182)
git (administrator)
2020-05-16 14:21

Branch CR27087 has been deleted by inv.

SHA-1: 91445588c64eac58a304614a4b8647ec04228c82

- Related Changesets
occt: master 79aa9b5c
Timestamp: 2019-09-03 12:48:24
Author: 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
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 View Revisions
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 View Revisions
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker