View Issue Details

IDProjectCategoryView StatusLast Update
0022793CommunityOCCT:Modeling Algorithmspublic2015-05-14 16:24
Reporterszy Assigned Tobugmaster  
PriorityhighSeverityblock 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.2 
Target Version6.9.0Fixed in Version6.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 Files

  • shapes21981.zip (2,697 bytes)

Relationships

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

Activities

szy

2011-11-02 12:05

manager  

shapes21981.zip (2,697 bytes)

abv

2013-03-01 22:20

manager   ~0023555

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.

nbv

2015-04-10 13:08

developer   ~0039562

Last edited: 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.

nbv

2015-04-10 13:09

developer   ~0039563

Dear Mikhail,

Shall we fix something?

msv

2015-04-10 14:58

developer   ~0039578

Not reproduced on the current master.

git

2015-04-16 15:54

administrator   ~0039896

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

mkv

2015-04-16 16:21

tester   ~0039899

Dear BugMaster,
Test case
bugs modalg_6 bug22793
was created and pushed to new branch CR22793 of occt git-repository, it is OK.

git

2015-05-14 16:24

administrator   ~0040933

Branch CR22793 has been deleted by inv.

SHA-1: 1a5d45ba0ae64f2edd5e7c58a711b0b3a9c0ec6c

Related Changesets

occt: master f3981c67

2015-04-16 12:53:07

mkv


Committer: bugmaster Details Diff
0022793: Boolean cut operation hangs computer
Test case for issue CR22793
Affected Issues
0022793
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
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 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:24 git Note Added: 0040933