MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022793Community[OCCT] OCCT:Modeling Algorithmspublic2011-11-02 12:052015-05-14 16:24
Reporterszy 
Assigned Tobugmaster 
PriorityhighSeverityblock 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.5.2 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0022793: Boolean cut operation hangs computer
DescriptionPost from the Forum - http://www.opencascade.org/org/forum/thread_21981/. [^]
1." Our application faces a great lot of data imported from IFC file which are produced from various CAD systems.
And few days ago, we got an IFC file. When we handle that IFC file by calling BRepAlgoAPI_Common and BRepAlgoAPI_Cut, we met an endless loop.

After debug, we found it is in method BRepClass3d_Solidexplorer::OtherSegment, line 554, myParamOnEdge*=0.5.
myParamOnEdge is decreased a half evey time. If the "return" sectence never meet before it, this value will be decreased to 0.000000000000. And then it will never change. So endless loop produced."

2. "Test data added.
- MS Windows 7 Win32 & VC9, OpenCASCADE 6.5.1, precision is by default.
Test method: TestOCCAPI method.txt
Test data: "Void.brep" cut "Positive.brep" cause endless loop.
Test data: "Void1.brep" cut "Positive.brep" can not get good result.
"
3." My modification:
line 554: else if(myParamOnEdge > Precision::Confusion()) myParamOnEdge*=0.5;
line 555: else{break;}

The endless loop can be fixed by the above modification.
But Precision::Confusion() = 1e-7, it is too small, start from 0.9 decrease to this value need 24 times. It will costs a lot of time to run the "while" loop 24 times.
Is there a better reasonalbe value to replace Precision::Confusion()? "


Steps To Reproducepload ALL
restore Positive.brep p
checkshape p
## Ok
toler p
## Ok
restore Void.brep v
checkshape v
## Ok
toler v
## Ok
bopcheck p
## Ok
bopcheck v
## Ok
bop p v
bopcut r
## !!! the last command hangs computer
TagsNo tags attached.
Test case numberbugs modalg_6(011) bug22793
Attached Fileszip file icon shapes21981.zip (2,697 bytes) 2011-11-02 12:05

- Relationships
related to 0021762closedemv Open CASCADE Integration new Boolean Operation algorithm to OCC 

-  Notes
(0023555)
abv (manager)
2013-03-01 22:20

The problem is not reproduced on current master (though reproduced on 6.5.4), most likely because of changes introduced by 0021762. However, the offending code is still there.
(0039562)
nbv (developer)
2015-04-10 13:08
edited on: 2015-04-10 13:09

Current state of this issue:

...
dchrono dc start
bop p v
bopcut r
dchrono dc stop

dchrono dc show
Elapsed time: 0 Hours 0 Minutes 0.460014374179 Seconds
CPU user time: 0.0312002 seconds
CPU system time: 0.0156001 seconds

nbs r
#Number of shapes in r
# VERTEX : 13
# EDGE : 22
# WIRE : 10
# FACE : 10
# SHELL : 1
# SOLID : 1
# COMPSOLID : 0
# COMPOUND : 1
# SHAPE : 58


bopcut does not hang up.

However,

BRepClass3d_SolidExplorer::OtherSegment(...)
{
...
myParamOnEdge*=0.5; //line 614
if(myParamOnEdge < 0.0001) {
...
}

I.e. BRepClass3d contains offending code as before.

(0039563)
nbv (developer)
2015-04-10 13:09

Dear Mikhail,

Shall we fix something?
(0039578)
msv (developer)
2015-04-10 14:58

Not reproduced on the current master.
(0039896)
git (administrator)
2015-04-16 15:54

Branch CR22793 has been created by mkv.

SHA-1: 1a5d45ba0ae64f2edd5e7c58a711b0b3a9c0ec6c


Detailed log of new commits:

Author: mkv
Date: Thu Apr 16 15:53:07 2015 +0300

    Test case for issue CR22793
(0039899)
mkv (tester)
2015-04-16 16:21

Dear BugMaster,
Test case
bugs modalg_6 bug22793
was created and pushed to new branch CR22793 of occt git-repository, it is OK.
(0040933)
git (administrator)
2015-05-14 16:24

Branch CR22793 has been deleted by inv.

SHA-1: 1a5d45ba0ae64f2edd5e7c58a711b0b3a9c0ec6c

- Related Changesets
occt: master f3981c67
Timestamp: 2015-04-16 12:53:07
Author: mkv
Committer: bugmaster
Details ] Diff ]
0022793: Boolean cut operation hangs computer
Test case for issue CR22793
add - tests/bugs/modalg_6/bug22793 Diff ] File ]

- Issue History
Date Modified Username Field Change
2011-11-02 12:05 szy New Issue
2011-11-02 12:05 szy Assigned To => jgv
2011-11-02 12:05 szy File Added: shapes21981.zip
2011-11-25 14:42 szy Status new => assigned
2012-03-12 07:36 abv Target Version 6.5.3 => 6.5.4
2012-10-23 19:14 abv Target Version 6.5.4 => 6.6.0
2013-03-01 22:19 abv Relationship added related to 0021762
2013-03-01 22:20 abv Note Added: 0023555
2013-03-01 22:20 abv Target Version 6.6.0 => 6.7.0
2013-12-21 10:21 abv Target Version 6.7.0 => 6.7.1
2014-04-04 18:27 abv Target Version 6.7.1 => 6.8.0
2014-09-26 10:47 abv Target Version 6.8.0 => 7.1.0
2015-04-10 13:08 nbv Note Added: 0039562
2015-04-10 13:09 nbv Note Added: 0039563
2015-04-10 13:09 nbv Assigned To jgv => msv
2015-04-10 13:09 nbv Status assigned => feedback
2015-04-10 13:09 nbv Note Edited: 0039562 View Revisions
2015-04-10 14:58 msv Note Added: 0039578
2015-04-10 14:58 msv Status feedback => resolved
2015-04-10 14:58 msv Assigned To msv => bugmaster
2015-04-10 14:58 msv Status resolved => reviewed
2015-04-10 14:59 msv Target Version 7.1.0 => 6.9.0
2015-04-10 15:51 mkv Assigned To bugmaster => mkv
2015-04-16 15:54 git Note Added: 0039896
2015-04-16 16:21 mkv Note Added: 0039899
2015-04-16 16:21 mkv Assigned To mkv => bugmaster
2015-04-16 16:21 mkv Status reviewed => tested
2015-04-16 16:22 mkv Test case number => bugs modalg_6(011) bug22793
2015-04-25 17:37 bugmaster Changeset attached => occt master f3981c67
2015-04-25 17:37 bugmaster Status tested => verified
2015-04-25 17:37 bugmaster Resolution open => fixed
2015-05-14 15:28 user533 Status verified => closed
2015-05-14 15:30 user533 Fixed in Version => 6.9.0
2015-05-14 16:24 git Note Added: 0040933


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker