DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0032960

Wrong result of BRepExtrema_DistShapeShape after translation

CommunityOCCT:Modeling Algorithmsclosed22 public notes

Search issues

Description

Before translation of both solids on some same vector, the distance between these solids was calculated as 1mm. After translation algorithm calculates near 0.0 (1.20943e-14). And if we get points dist.PointOnShape1(i) and dist.PointOnShape2(i) it will provide completely wrong positions.

Original discussion on forum https://dev.opencascade.org/content/wrong-result-brepextremadistshapeshape-after-translation

Steps to reproduce

testgrid bugs fclasses bug32960

Public activity

22 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Commenter 1 please attach the file.
02Author
The file.
Attachment 1 (BREP) (246,233 bytes)   
03Author
But original file was attached to ticket.
04Commenter 4
I confirm that we have a problem with DistShapeShape algorithm. If we remove location of shapes (with removeloc command) the distance is calculated correctly.
05Commenter 1
Dear collegues. The error does not reproduces on current master branch of OCCT.

Commenter 1, Commenter 2, Commenter 3 - FYI.
06Commenter 6
Then please create a test case to close this bug.
07Commenter 7
Also, it would be nice to know which fix corrected this bug, and make a relation link.
08Commenter 3
Commenter 3, ok, i will try to calculate correspond commit.
09Commenter 4
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: ddzama
Date: Mon Aug 29 17:27:16 2022 +0300

    0032960: Add corresponding test.
10Commenter 10
+checkreal "Distance value check" $aDist $aDist_Exp $absTol $relTol
\ No newline at end of file

Please add new line.
11Commenter 11
In test case, move bug title into "puts" statement along with bug number.
12Commenter 12
And please run tests on jenkins.
13Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
14Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
15Commenter 3
Commenter 3, please, clarify, what i should to do?
"In test case, move bug title into "puts" statement along with bug number"
16Commenter 16
Just replace
+puts "========"
+puts "OCC32960"
+puts "========"
+puts ""
+##############################################
+# BRepExtrema_DistShapeShape returns wrong result
+# Correct distance is 1.0
+##############################################

with
+puts "========"
+puts "0032960: Wrong result of BRepExtrema_DistShapeShape after translation"
+puts "========"
+# Correct distance is 1.0
17Commenter 3
Commenter 3 - ok, thanks.
It's done.
18Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
19Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
20Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
21Commenter 21
Combination -
OCCT branch : [archived branch]
master SHA - changes and them, and you can discard any commits you make in this
[revision removed]
changes and them, and you can discard any commits you make in this
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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: 18769.440000000584 / 18960.430000000466 [-1.01%]
Products
Total CPU difference: 11959.870000000119 / 12078.45000000014 [-0.98%]
Windows-64-VC14:
OCCT
Total CPU difference: 20851.0625 / 20895.5625 [-0.21%]
Products
Total CPU difference: 14084.640625 / 13533.359375 [+4.07%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
22Commenter 4
Branch [archived branch] has been deleted by Participant.

[revision removed]