MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023933Community[OCCT] OCCT:Modeling Algorithmspublic2013-04-25 02:412013-12-19 13:55
ReporterAaron Michalk 
Assigned Toemv 
PrioritynormalSeveritymajor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2010OS Version32 bit
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 6.7.0Fixed in Version[OCCT] 6.7.0 
Summary0023933: Self intersection reported after Fuse operation
DescriptionAfter performing a BRepAlgoAPI_Fuse, BRepAlgoAPI_Check fails with BOPAlgo_SelfIntersect.
Steps To ReproduceBRep_Builder builder;
TopoDS_Shape a, b;
BRepTools::Read(a, std::ifstream("a.brep", builder);
BRepTools::Read(b, std::ifstream("b.brep", builder);
TopoDS_Shape c = BRepAlgoAPI_Fuse(a, b);
assert(BRepAlgoAPI_Check(c).IsValid());
TagsNo tags attached.
Test case numberbugs modalg_5(010) bug23933
Attached Fileszip file icon ab.zip (24,357 bytes) 2013-04-25 02:41

- Relationships

-  Notes
(0024266)
abv (manager)
2013-04-25 10:16

I could not reproduce this in DRAW with official distribution of OCCT 6.6.0 on my system (Windows 7 64-bit). The commands are:

restore a.brep
restore b.brep
bfuse r a b
checkshape r

Note that files a.brep and b.brep need to be modified for DRAW to be able to read them (add first line containing "DBRep_DrawableShape").
The result looks Ok.

Please check if this is reproducible in DRAW on your system, and indicate your platform (OS, compiler, used build method).
(0024267)
abv (manager)
2013-04-25 10:20

Oops, sorry, the system has been properly indicated, please ignore my request for it. Just please check if the problem can be reproduced with the DRAW commands above.
(0024270)
abv (manager)
2013-04-25 12:23

I have checked with VS 2010 (10.0.40219.1 SP 1 Rel), Debug mode: the problem is not reproduced in DRAW
(0024284)
Aaron Michalk (reporter)
2013-04-26 03:32

checkshape reports that "This shape seems to be valid." However, checkshape only calls BRepCheck_Analyzer. It does not call BRepAlgoAPI_Check where the problem is.
(0024285)
abv (manager)
2013-04-26 07:05

Sorry I did not recognize the problem is not in BRepCheck but in BOP validity.

The script to reproduce a problem in DRAW:

restore a.brep
restore b.brep
checkshape a
checkshape b
bopargcheck a b -F #F
bfuse r a b
checkshape r
bopargcheck r #F

In OCCT 6.6.0, the last bopargcheck reports self-intersection on one face.
In OCCT 6.5.4 and 6.5.5, first bopargcheck reports 38 faulties, and second 4.
(0024390)
emv (developer)
2013-05-15 11:39

The result of fuse operation is a valid shape. So the problem was in the checker for self intersection. I have fixed the problem. The draw commands bopcheck and bopargcheck report OK now for the result.
Please review the Git branch CR23933.
(0024416)
abv (manager)
2013-05-16 13:31

Could you provide some explanation to this change? As I can guess from the code, it applies only for (aTypeInt == 4), i.e. likely edge-face intersection, and skips if intersection is shape. Does this mean that no intersection exists? Should not this be applied to other cases?
(0024427)
emv (developer)
2013-05-17 12:56

Yes, it means that there is no intersection exists and this should not be applied to the other cases.
I have added the additional check for the case like that (edge lies on the surface of the face, but not on the face itself) in IntTools_BeanFaceIntersector::FastComputeExactIntersection() to prevent creating an Edge/Face intersection. So, please review the Git branch CR23933 once more.
(0024445)
mkv (tester)
2013-05-21 10:06
edited on: 2013-05-21 10:06

Dear BugMaster,

Branch CR23933 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 6aded94450a81ea0b7caddc6c682e692eafa74ba

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 64 (64 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs modalg_5(010) bug23933 - OK

Testing on Linux:
Total MEMORY difference: 366022500 / 365872296
Total CPU difference: 42718.340000001 / 45787.80000000135

Testing on Windows:
Total MEMORY difference: 415905576 / 418425896
Total CPU difference: 35951.6875 / 30650.765625

There are not differences in images found by testdiff.


- Related Changesets
occt: master f1419025
Timestamp: 2013-05-23 07:55:08
Author: emv
Details ] Diff ]
0023933: Self intersection reported after Fuse operation.

Additional check has been added in IntTools_BeanFaceIntersector::FastComputeExactIntersection() to prevent
creating an Edge/Face intersection for the case when edge lies on the surface of the face, but not on the face itself.
Adding test case for this fix
mod - src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx Diff ] File ]
mod - src/BOPTest/BOPTest_CheckCommands.cxx Diff ] File ]
mod - src/IntTools/IntTools_BeanFaceIntersector.cxx Diff ] File ]
add - tests/bugs/modalg_5/bug23933 Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-04-25 02:41 Aaron Michalk New Issue
2013-04-25 02:41 Aaron Michalk Assigned To => jgv
2013-04-25 02:41 Aaron Michalk File Added: ab.zip
2013-04-25 10:16 abv Note Added: 0024266
2013-04-25 10:16 abv Assigned To jgv => Aaron Michalk
2013-04-25 10:16 abv Status new => feedback
2013-04-25 10:20 abv Note Added: 0024267
2013-04-25 12:23 abv Note Added: 0024270
2013-04-26 03:32 Aaron Michalk Note Added: 0024284
2013-04-26 07:05 abv Note Added: 0024285
2013-04-26 07:05 abv Assigned To Aaron Michalk => emv
2013-04-26 07:05 abv Status feedback => acknowledged
2013-05-15 11:39 emv Note Added: 0024390
2013-05-15 11:39 emv Assigned To emv => abv
2013-05-15 11:39 emv Status acknowledged => resolved
2013-05-16 10:13 emv Assigned To abv => emv
2013-05-16 10:13 emv Status resolved => assigned
2013-05-16 11:40 emv Assigned To emv => abv
2013-05-16 11:40 emv Status assigned => resolved
2013-05-16 13:31 abv Note Added: 0024416
2013-05-17 12:56 emv Note Added: 0024427
2013-05-17 13:14 abv Assigned To abv => bugmaster
2013-05-17 13:14 abv Status resolved => reviewed
2013-05-17 14:15 mkv Assigned To bugmaster => mkv
2013-05-21 10:06 mkv Note Added: 0024445
2013-05-21 10:06 mkv Note Edited: 0024445 View Revisions
2013-05-21 10:07 mkv Test case number => bugs modalg_5(010) bug23933
2013-05-21 10:07 mkv Assigned To mkv => bugmaster
2013-05-21 10:07 mkv Status reviewed => tested
2013-05-23 12:12 bugmaster Target Version => 6.7.0
2013-05-24 13:06 emv Changeset attached => occt master f1419025
2013-05-24 13:06 emv Assigned To bugmaster => emv
2013-05-24 13:06 emv Status tested => verified
2013-05-24 13:06 emv Resolution open => fixed
2013-12-19 13:53 bugmaster Status verified => closed
2013-12-19 13:55 bugmaster Fixed in Version => 6.7.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker