MantisBT - Open CASCADE
View Issue Details
0028245Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2016-12-19 11:092018-06-29 21:19
emv 
bugmaster 
normalminor 
closedfixed 
[OCCT] 7.1.0 
[OCCT] 7.3.0[OCCT] 7.3.0 
boolean cells_test K1
0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
Result of Cells Builder algorithm becomes invalid (the sharing of edges is lost) after removal of internal boundaries on faces.
circle c1 0 0 0 0 0 1 10
circle c2 10 0 0 0 0 1 10
circle c3 5 9 0 0 0 1 10

mkedge e1 c1
mkedge e2 c2
mkedge e3 c3

wire w1 e1
wire w2 e2
wire w3 e3

mkplane f1 w1
mkplane f2 w2
mkplane f3 w3

bclearobjects
bcleartools
baddobjects f1 f2 f3
bfillds
bcbuild rx

bcadd res f1 1 -m 1
bcadd res f2 1 f3 0 -m 1
bcadd res f3 1 f1 0 -m 2

donly res
bopcheck res
# OK

bcremoveint res
donly res
bopcheck res
# faulty
No tags attached.
related to 0028228closed bugmaster Provide possibility to keep the given edges during unification of faces in ShapeUpgrade_UnifySameDomain algorithm 
related to 0028913closed bugmaster UnifySameDomain crashes with error: "a shape is modified and removed simultaneously" 
Issue History
2016-12-19 11:09emvNew Issue
2016-12-19 11:09emvAssigned To => msv
2016-12-19 11:09emvRelationship addedrelated to 0028228
2017-06-28 10:57emvAssigned Tomsv => imn
2017-06-28 10:57emvStatusnew => assigned
2017-07-07 11:14gitNote Added: 0068066
2017-07-07 11:18gitNote Added: 0068067
2017-07-07 11:20imnAssigned Toimn => msv
2017-07-07 11:20imnStatusassigned => resolved
2017-07-07 11:21imnNote Added: 0068068
2017-07-10 10:36gitNote Added: 0068141
2017-07-10 10:45msvNote Added: 0068145
2017-07-10 11:01msvNote Added: 0068146
2017-07-10 11:01msvAssigned Tomsv => imn
2017-07-10 11:01msvStatusresolved => assigned
2017-07-12 10:47imnRelationship addedrelated to 0028913
2017-07-12 14:10gitNote Added: 0068211
2017-08-16 11:48emvNote Added: 0069440
2017-08-28 12:52mkvTest case number => bugs modalg_7 bug28245
2017-08-28 12:52mkvNote Added: 0069974
2017-08-28 18:35abvTarget Version7.2.0 => 7.3.0
2017-09-26 12:36gitNote Added: 0070855
2017-09-26 12:37imnNote Added: 0070856
2017-09-26 12:37imnAssigned Toimn => msv
2017-09-26 12:37imnStatusassigned => resolved
2017-09-28 17:42gitNote Added: 0070942
2017-09-28 17:47msvNote Added: 0070943
2017-09-28 17:48msvAssigned Tomsv => emv
2017-09-28 17:48msvNote Added: 0070944
2017-09-29 09:54emvNote Added: 0070952
2017-09-29 09:54emvAssigned Toemv => msv
2017-09-29 09:54emvStatusresolved => assigned
2017-09-29 11:29gitNote Added: 0070961
2017-09-29 11:30gitNote Added: 0070962
2017-09-29 11:33gitNote Added: 0070963
2017-10-02 20:26gitNote Added: 0071126
2017-10-03 18:10msvNote Added: 0071171
2017-10-03 18:10msvAssigned Tomsv => emv
2017-10-03 18:10msvStatusassigned => resolved
2017-10-04 09:33emvNote Added: 0071176
2017-10-04 09:33emvAssigned Toemv => msv
2017-10-04 09:33emvStatusresolved => assigned
2017-10-04 10:56gitNote Added: 0071182
2017-10-04 15:26msvNote Added: 0071196
2017-10-04 15:26msvAssigned Tomsv => emv
2017-10-04 15:26msvStatusassigned => resolved
2017-10-05 07:07emvNote Added: 0071223
2017-10-05 07:07emvAssigned Toemv => bugmaster
2017-10-05 07:07emvStatusresolved => reviewed
2017-10-05 13:25bugmasterTest case numberbugs modalg_7 bug28245 => boolean cells_test K1
2017-10-05 13:26bugmasterNote Added: 0071236
2017-10-05 13:26bugmasterStatusreviewed => tested
2017-10-06 14:55bugmasterChangeset attached => occt master 385d47dd
2017-10-06 14:55bugmasterStatustested => verified
2017-10-06 14:55bugmasterResolutionopen => fixed
2017-10-14 12:19gitNote Added: 0071438
2017-10-14 12:19gitNote Added: 0071439
2017-10-14 12:19gitNote Added: 0071440
2017-10-14 12:19gitNote Added: 0071441
2017-10-14 12:19gitNote Added: 0071442
2018-06-29 21:15aivFixed in Version => 7.3.0
2018-06-29 21:19aivStatusverified => closed

Notes
(0068066)
git   
2017-07-07 11:14   
Branch CR28245 has been created by imn.

SHA-1: 6de6259f2023f72cb374e1793096294390aaa470


Detailed log of new commits:

Author: imn
Date: Fri Jul 7 11:08:01 2017 +0300

    0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
    
    - Added method for finding shapes that belonged to different materials.
(0068067)
git   
2017-07-07 11:18   
Branch CR28245 has been updated forcibly by imn.

SHA-1: c14fb238037c2c6343d22077346f1e0613a1b4f6
(0068068)
imn   
2017-07-07 11:21   
Dear Mikhail, could you please review CR28245.
(0068141)
git   
2017-07-10 10:36   
Branch CR28245 has been updated forcibly by msv.

SHA-1: 2ccc582e357d6bf86b1cdc15b78f96736acae61d
(0068145)
msv   
2017-07-10 10:45   
Rebased on current master.
(0068146)
msv   
2017-07-10 11:01   
src\BOPAlgo\BOPAlgo_CellsBuilder.cxx
- 509: why do you search for shapes of different materials among the list of shapes attached to the same material?
- 512: why RemoveInternals() is called anyway if "aType == TopAbs_EDGE || aType == TopAbs_FACE"?
- Why bChanged flag is not set when RemoveInternals is called in fsChanged condition?
- the code of FindShapesOfDifferentMaterials is not effective:
  - it iterates of all materials map for each edge and for each face connected to the edge;
  - it searches for an item in the list (1131);
  - it fills in a map aSMM only for further iterating on it.

There are a lot of logical errors. I wonder how this patch can fix the bug.
It is needed totally revise the patch.
(0068211)
git   
2017-07-12 14:10   
Branch CR28245_1 has been created by imn.

SHA-1: 4f9e8c5f823ffd99b56167e12b230022a6697ba5


Detailed log of new commits:

Author: imn
Date: Wed Jul 12 10:52:41 2017 +0300

    0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
    
    - Added method for finding shapes that belonged to different materials.
(0069440)
emv   
2017-08-16 11:48   
It is necessary to rebase the fix on current master and check its status.
(0069974)
mkv   
2017-08-28 12:52   
Problem described in issue is reproduced on current state of OCCT.
(0070855)
git   
2017-09-26 12:36   
Branch CR28245_2 has been created by imn.

SHA-1: f2883e6798976e1693d72cf9d16b5ee34314f59e


Detailed log of new commits:

Author: imn
Date: Wed Jul 12 10:52:41 2017 +0300

    0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
    
    - Added method for finding shapes that belonged to different materials.
(0070856)
imn   
2017-09-26 12:37   
Dear Mikhail, could you please review CR28245_2.
(0070942)
git   
2017-09-28 17:42   
Branch CR28245_3 has been created by msv.

SHA-1: e4045ec308adf81d3470746e27452a8889fe32e5


Detailed log of new commits:

Author: imn
Date: Wed Jul 12 10:52:41 2017 +0300

    0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
    
    When removing internal boundaries between faces of the same material do it once for the whole shape, and at this keep boundaries between areas with different material.
(0070943)
msv   
2017-09-28 17:47   
Testing job http://jenkins-test-10.nnov.opencascade.com:8080/view/CR28245-master-MSV/view/COMPARE/ [^]
(0070944)
msv   
2017-09-28 17:48   
Eugeny, please review it.
(0070952)
emv   
2017-09-29 09:54   
1. src/BOPAlgo/BOPAlgo_CellsBuilder.hxx
rename theKeepMapOfShape to theMapKeepBnd
2. src/BOPAlgo/BOPAlgo_CellsBuilder.cxx
line 522 - iteration should be performed for aLSNew, not aLS.
line 504 is not needed.
3. tests/bugs/modalg_7/bug28245
add check for the area of the result
(0070961)
git   
2017-09-29 11:29   
Branch CR28245_3 has been updated by msv.

SHA-1: 8406d6494ac83006b970e715d8e93725b881cebc


Detailed log of new commits:

Author: msv
Date: Fri Sep 29 11:23:45 2017 +0300

    # consider remarks

(0070962)
git   
2017-09-29 11:30   
Branch CR28245_3 has been updated forcibly by msv.

SHA-1: 218c65598c1733183bfa920e18a2cbadec63e3aa
(0070963)
git   
2017-09-29 11:33   
Branch CR28245_4 has been created by msv.

SHA-1: 154ef2115a2b84ac515b3abe1dc9500c1745b06a


Detailed log of new commits:

Author: imn
Date: Wed Jul 12 10:52:41 2017 +0300

    0028245: Result of Cells Builder algorithm becomes invalid after removal of internal boundaries on faces
    
    When removing internal boundaries between faces of the same material do it once for the whole shape, and at this keep boundaries between areas with different material.
(0071126)
git   
2017-10-02 20:26   
Branch CR28245_4 has been updated forcibly by msv.

SHA-1: fb56e290f4345e4354f4b7e909582d75caf24a44
(0071171)
msv   
2017-10-03 18:10   
Please review again.

Note that the following image difference
  IMAGE boolean cells_test D5: D5.png differs
is expected improvement.
(0071176)
emv   
2017-10-04 09:33   
src/BOPAlgo/BOPAlgo_CellsBuilder.cxx
- The blocks 504-511 and 512-519 can be combined into a single block. It is just necessary to chose the indexed for the arrays basing on the value of "aType".
- comment in the line 549 is not relevant.
- make CollectMaterialBoundaries static in the file BOPAlgo_CellsBuilder.cxx.
- update test
case boolean cells_test D5
with the check for self-intersection of the result or with the check for number of shapes in the result to make the validation of the result more reliable.
(0071182)
git   
2017-10-04 10:56   
Branch CR28245_4 has been updated by msv.

SHA-1: 1041fa1a11f7b44869b9983be86e4b1ed5c457fb


Detailed log of new commits:

Author: msv
Date: Wed Oct 4 10:52:57 2017 +0300

    # Consider remarks

(0071196)
msv   
2017-10-04 15:26   
Remarks were considered.
Fix was re-tested.
(0071223)
emv   
2017-10-05 07:07   
Reviewed.
(0071236)
bugmaster   
2017-10-05 13:26   
Combination -
OCCT branch : CR28245_4 SHA-1: 1041fa1a11f7b44869b9983be86e4b1ed5c457fb
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.


Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
No differences that require special attention

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

New test case is OK
(0071438)
git   
2017-10-14 12:19   
Branch CR28245 has been deleted by kgv.

SHA-1: 2ccc582e357d6bf86b1cdc15b78f96736acae61d
(0071439)
git   
2017-10-14 12:19   
Branch CR28245_1 has been deleted by kgv.

SHA-1: 4f9e8c5f823ffd99b56167e12b230022a6697ba5
(0071440)
git   
2017-10-14 12:19   
Branch CR28245_2 has been deleted by kgv.

SHA-1: f2883e6798976e1693d72cf9d16b5ee34314f59e
(0071441)
git   
2017-10-14 12:19   
Branch CR28245_3 has been deleted by kgv.

SHA-1: 218c65598c1733183bfa920e18a2cbadec63e3aa
(0071442)
git   
2017-10-14 12:19   
Branch CR28245_4 has been deleted by kgv.

SHA-1: 1041fa1a11f7b44869b9983be86e4b1ed5c457fb