View Issue Details

IDProjectCategoryView StatusLast Update
0032552Open CASCADEOCCT:Modeling Algorithmspublic2021-09-20 17:31
ReporterasuravenAssigned Tosmoskvin 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory
DescriptionWhen calculating the distance by the distmini command the BRepExtrema_DistShapeShape algorithm consumes too much memory on big models
Steps To Reproducepload ALL
# ~60MB model
restore [locate_data_file 5000-12.brep] s1
# ~35MB model
restore [locate_data_file BPLSEITLI-12.brep] s2
# process memory increases up to 2.9 GB
distmini res s1 s2
TagsNo tags attached.
Test case numbernot required

Relationships

related to 0032539 closedsmoskvin Modeling Algorithms - Parallelize BRepExtrema_DistShapeShape algorithm 

Activities

asuraven

2021-09-01 18:34

reporter   ~0103643

git

2021-09-02 13:59

administrator   ~0103674

Branch CR32552 has been created by asuraven.

SHA-1: 7356559452aca4adb99cf853837d89131b0e1bad


Detailed log of new commits:

Author: asuraven
Date: Thu Sep 2 13:59:04 2021 +0300

    0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory
    
    Used a new BRepExtrema_DistShapeShape::DistanceVertVert() function to replace DistanceMapMap() to calculate vertex/vertex distance

asuraven

2021-09-02 21:34

reporter   ~0103696

git

2021-09-07 16:56

administrator   ~0103898

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: 0842b06db708b23c29e9a24c066868f4b36647c2

git

2021-09-10 14:46

administrator   ~0103982

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: f317dcfdc963c3689eed0a3716996b38d6335e8c

asuraven

2021-09-10 14:46

reporter   ~0103983

git

2021-09-10 21:05

administrator   ~0103996

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: 0905d8c5f29c5d4c505982ce5bc20770d7b4e070

git

2021-09-13 12:26

administrator   ~0104059

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: bb3b8b560db204bb03a4be976a98dc4e4d729861

asuraven

2021-09-14 19:34

reporter   ~0104081

asuraven

2021-09-14 19:35

reporter   ~0104082

tests result:
http://jenkins-test-occt.nnov.opencascade.com/view/CR32552-master-ASURAVEN/view/COMPARE/

msv

2021-09-14 19:51

developer   ~0104083

Please check if the following change in image is not caused by your changes:

IMAGE pmivis import nist_ct_06_inch: nist_ct_06_inch.png differs [2663 different pixels]

msv

2021-09-14 20:02

developer   ~0104084

  NCollection_Vector<BRepExtrema_CheckPair> aPairList;

This variable is not used.

    for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2)
    {
      TopoDS_Vertex aVertex1 = TopoDS::Vertex(theMap1.FindKey(anIdx1));
      TopoDS_Vertex aVertex2 = TopoDS::Vertex(theMap2.FindKey(anIdx2));

      const gp_Pnt aPoint1 = BRep_Tool::Pnt(aVertex1);
      const gp_Pnt aPoint2 = BRep_Tool::Pnt(aVertex2);

The definitions of aVertex1, aPoint1 must be moved out of inner loop.

git

2021-09-15 19:19

administrator   ~0104102

Branch CR32552_1 has been created by asuraven.

SHA-1: 472d689579bc44a4376b6478a1ec1adabf9f980c


Detailed log of new commits:

Author: asuraven
Date: Wed Sep 15 19:19:27 2021 +0300

    0032552: for test branch

git

2021-09-16 11:31

administrator   ~0104116

Branch CR32552_1 has been updated forcibly by asuraven.

SHA-1: 8cdf10700fcf039e56a0659aeaf85efe1b388471

asuraven

2021-09-16 18:57

reporter   ~0104130

git

2021-09-17 11:23

administrator   ~0104138

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: f386861fbf4b136226d4e49e481ca614d3c707d9

git

2021-09-17 11:26

administrator   ~0104139

Branch CR32552_1 has been deleted by asuraven.

SHA-1: 8cdf10700fcf039e56a0659aeaf85efe1b388471

asuraven

2021-09-17 11:27

reporter   ~0104140

remarks fixed
tests are running again now

asuraven

2021-09-17 13:59

reporter   ~0104146

tests results for branch CR32552 are here:
http://jenkins-test-occt.nnov.opencascade.com/view/CR32552-master-ASURAVEN/view/COMPARE/

msv

2021-09-17 15:06

developer   ~0104148

    TopoDS_Vertex aVertex1 = TopoDS::Vertex(theMap1.FindKey(anIdx1));
...
      TopoDS_Vertex aVertex2 = TopoDS::Vertex(theMap2.FindKey(anIdx2));

TopoDS::Vertex returns reference, so use const& to avoid copying shapes.

msv

2021-09-17 15:07

developer   ~0104149

I think this simple change won't need testing.

git

2021-09-17 15:35

administrator   ~0104150

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: 283668f02b61348795f977f13c8fa04d1d28ed76

asuraven

2021-09-17 15:36

reporter   ~0104151

fixed

git

2021-09-17 17:17

administrator   ~0104163

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: 136238157f55cde882f7e225976e1bba52771c9a

msv

2021-09-17 17:20

developer   ~0104165

For integration:
occt - CR32552
products - none

kgv

2021-09-17 17:27

developer   ~0104166


+  Standard_Boolean DistanceVertVert(const TopTools_IndexedMapOfShape& theMap1,
+                                    const TopTools_IndexedMapOfShape& theMap2,

It would be nice having some description of the method (not sure that name is self-explanatory here)...

git

2021-09-17 17:36

administrator   ~0104167

Branch CR32552 has been updated forcibly by asuraven.

SHA-1: b6f0ea1774255228514fd745336245a5e1f1835a

asuraven

2021-09-17 17:37

reporter   ~0104168

Comment added

bugmaster

2021-09-18 09:37

administrator   ~0104177

Combination -
OCCT branch : IR-2021-09-17
master SHA - 812ee2c9bec89902de2ff85201cb314e0de894cc
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2021-09-17 SHA - 1127e31e32f90ff63544b0516092694f1a36932f
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: 17390.540000000547 / 17358.370000000414 [+0.19%]
Products
Total CPU difference: 11364.740000000118 / 11411.36000000011 [-0.41%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.5625 / 19327.15625 [-0.03%]
Products
Total CPU difference: 12746.171875 / 12747.78125 [-0.01%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2021-09-18 09:54

administrator   ~0104211

Branch CR32552 has been deleted by mnt.

SHA-1: b6f0ea1774255228514fd745336245a5e1f1835a

asuraven

2021-09-20 17:09

reporter   ~0104235

Related Changesets

occt: master 92c1f972

2021-09-02 10:59:04

asuraven


Committer: smoskvin Details Diff
0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory

Used a new BRepExtrema_DistShapeShape::DistanceVertVert() function to replace DistanceMapMap() to calculate vertex/vertex distance
Affected Issues
0032552
mod - src/BRepExtrema/BRepExtrema_DistShapeShape.cxx Diff File
mod - src/BRepExtrema/BRepExtrema_DistShapeShape.hxx Diff File

Issue History

Date Modified Username Field Change
2021-09-01 18:33 asuraven New Issue
2021-09-01 18:33 asuraven Assigned To => asuraven
2021-09-01 18:34 asuraven Note Added: 0103643
2021-09-01 18:34 asuraven Status new => assigned
2021-09-01 18:35 asuraven Relationship added related to 0032539
2021-09-02 13:59 git Note Added: 0103674
2021-09-02 14:08 asuraven File Added: CR32552 compare.xlsx
2021-09-02 14:10 asuraven File Deleted: CR32552 compare.xlsx
2021-09-02 21:34 asuraven Note Added: 0103696
2021-09-07 16:56 git Note Added: 0103898
2021-09-10 14:46 git Note Added: 0103982
2021-09-10 14:46 asuraven Note Added: 0103983
2021-09-10 21:05 git Note Added: 0103996
2021-09-13 12:26 git Note Added: 0104059
2021-09-14 19:34 asuraven Note Added: 0104081
2021-09-14 19:35 asuraven Test case number => not required
2021-09-14 19:35 asuraven Note Added: 0104082
2021-09-14 19:35 asuraven Assigned To asuraven => msv
2021-09-14 19:35 asuraven Status assigned => resolved
2021-09-14 19:51 msv Note Added: 0104083
2021-09-14 20:02 msv Note Added: 0104084
2021-09-14 20:02 msv Assigned To msv => asuraven
2021-09-14 20:02 msv Status resolved => assigned
2021-09-15 19:19 git Note Added: 0104102
2021-09-16 11:31 git Note Added: 0104116
2021-09-16 18:57 asuraven Note Added: 0104130
2021-09-17 11:23 git Note Added: 0104138
2021-09-17 11:26 git Note Added: 0104139
2021-09-17 11:27 asuraven Note Added: 0104140
2021-09-17 11:27 asuraven Assigned To asuraven => msv
2021-09-17 11:27 asuraven Status assigned => resolved
2021-09-17 13:59 asuraven Note Added: 0104146
2021-09-17 15:06 msv Note Added: 0104148
2021-09-17 15:07 msv Note Added: 0104149
2021-09-17 15:07 msv Assigned To msv => asuraven
2021-09-17 15:07 msv Status resolved => assigned
2021-09-17 15:35 git Note Added: 0104150
2021-09-17 15:36 asuraven Note Added: 0104151
2021-09-17 15:36 asuraven Assigned To asuraven => msv
2021-09-17 15:36 asuraven Status assigned => resolved
2021-09-17 17:17 git Note Added: 0104163
2021-09-17 17:20 msv Note Added: 0104165
2021-09-17 17:20 msv Assigned To msv => bugmaster
2021-09-17 17:20 msv Status resolved => reviewed
2021-09-17 17:27 kgv Note Added: 0104166
2021-09-17 17:36 git Note Added: 0104167
2021-09-17 17:37 asuraven Note Added: 0104168
2021-09-18 09:37 bugmaster Status reviewed => tested
2021-09-18 09:37 bugmaster Note Added: 0104177
2021-09-18 09:43 smoskvin Changeset attached => occt master 92c1f972
2021-09-18 09:43 smoskvin Assigned To bugmaster => smoskvin
2021-09-18 09:43 smoskvin Status tested => verified
2021-09-18 09:43 smoskvin Resolution open => fixed
2021-09-18 09:54 git Note Added: 0104211
2021-09-20 17:06 asuraven File Added: bug32539_1.7z
2021-09-20 17:09 asuraven Test case number not required => perf\modalg\bug32539_1 perf\modalg\bug32539_2
2021-09-20 17:09 asuraven Note Added: 0104235
2021-09-20 17:31 asuraven File Deleted: bug32539_1.7z
2021-09-20 17:31 asuraven Test case number perf\modalg\bug32539_1 perf\modalg\bug32539_2 => not required