View Issue Details

IDProjectCategoryView StatusLast Update
0024706Open CASCADEOCCT:Modeling Algorithmspublic2014-05-05 13:38
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.7.1Fixed in Version6.7.1 
Summary0024706: Solids produced by BOP do not have flag Closed set in shells
DescriptionA finite solid is valid only if it is based on topologically closed shells. In OCCT shape (TopoDS_Shape) there is a flag Closed which allows to mark a shell as closed one. This flag can be used by algorithms that need to check closure of the shell, without running topological analysis. For instance, it is used in 3d viewer for activation of back-face culling on a solid objects, see 0024521.

OCCT algorithms that construct a new solid should set this flag properly. The algorithms like BRepPrimAPI_MakeBox do that:

Draw[83]> box b 10 10 10
Draw[84]> expl b sh
b_1
Draw[85]> whatis b_1
b_1 is a shape SHELL FORWARD Modified Orientable Closed

However, the Boolean operation algorithms do not set this flag properly:

Draw[86]> psph s 2
Draw[87]> bcut r b s
Draw[88]> expl r sh
r_1
Draw[89]> whatis r_1
r_1 is a shape SHELL FORWARD Modified Orientable

This should be fixed.

The observed effect of this is presence of visual artifacts at the back side of the sharp edges when faces are oriented mostly orthogonal to the screen, due to visibility of back faces which should be culled in a good solid. In the example above, display the shapes r and b in shaded mode and then rotate to see the difference:

Draw[]> ttranslate r 10 10 10
Draw[]> vsetdispmode 1
Draw[]> vdisplay b r
Draw[]> vfit

Note that old Boolean operations (e.g. command "cut") do set the Closed flag on shell properly. Moreover, command "sweep" even sets this flag on solid.

Perhaps BRepCheck should be improved to check this and other similar flags and either report or set them as appropriate.
Additional information
and documentation updates
Flag CLOSED is set for closed shells created during perform of Boolean Operation.
TagsNo tags attached.
Test case numberbugs modalg_5(010) bug24706

Relationships

related to 0024521 closedbugmaster Visualization - automatic back face culling is not turned on for Solids packed into compound 

Activities

emv

2014-03-14 13:44

developer   ~0028281

Git branch CR24706 is ready to be reviewed.

pkv

2014-03-14 14:59

developer   ~0028284

Reviewed.

mkv

2014-03-18 18:30

tester   ~0028330

Dear BugMaster,

Branch CR24706 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 92f711a205d187dbba845e02c17889fe5a30272b

Number of compiler warnings:

occt component :
Linux: 30 (30 on master)
Windows: 0 (0 on master)

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR24706-master-occt/Debian60-64/bugs/modalg_5/bug24706.html
http://occt-tests/CR24706-master-occt/Windows-32-VC9/bugs/modalg_5/bug24706.html
bugs modalg_5(010) bug24706: OK

Testing on Linux:
Total MEMORY difference: 386395792 / 386276008
Total CPU difference: 45278.14000000043 / 48827.5

Testing on Windows:
Total MEMORY difference: 431116624 / 430943812
Total CPU difference: 32909.640625 / 35761.78125

There are not differences in images found by testdiff.
http://occt-tests/CR24706-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR24706-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
IMAGE bugs modalg_2 bug578_2: bug578_2_Driver1_Viewer1_View1.png differs
IMAGE bugs modalg_2 bug23: bug23004_Driver1_Viewer1_View1.png differs
IMAGE bugs modalg_2 bug578_1: bug578_1_Driver1_Viewer1_View1.png differs
IMAGE bugs modalg_2 bug23004: bug23004_Driver1_Viewer1_View1.png differs
IMAGE bugs moddata_1 bug22761: bug22761_Driver1_Viewer1_View1.png differs

abv

2014-03-18 20:04

manager   ~0028335

Mikhail, please comment on this fragment of test script -- why you check the same twice?

set info_1 [whatis r_1]
if { [regexp {Closed} ${info_1}] } {
    puts "OK : Flag CLOSED is set for closed shells created during perform of Boolean Operation"
} else {
    puts "Faulty : Flag CLOSED is not set for closed shells created during perform of Boolean Operation"
}

set info_2 [whatis r_1]
if { [regexp {Closed} ${info_2}] } {
    puts "OK : Flag CLOSED is set for closed shells created during perform of Boolean Operation"
} else {
    puts "Faulty : Flag CLOSED is not set for closed shells created during perform of Boolean Operation"
}

And please use word "Error" to indicate error, not "Faulty" -- being adjective, "faulty" needs a subject to make a meaningful phrase

abv

2014-03-19 09:06

manager   ~0028341

Mikhail, please take care of what you write: what is the meaning of the phrase "There are not differences in images found by testdiff"? I would expect to see here "There are differences in images found by testdiff", as there ARE differences. When you want to say that there are NO differences, write "There are no differences in images found by testdiff" ("no" instead of "not").

The differences in shaded images are as expected (less artifacts near edges, more gaps on invalid shapes). Regarding differences on wireframe models, I guess these are instabilities -- please confirm.

mkv

2014-03-19 15:58

tester   ~0028358

Dear abv,
1. Test case bugs/modalg_5(010)/bug24706 was corrected.
2. Shaded image ot test case bugs/moddata_1(011)/bug22761 is no stable.
3. Shaded images ot test cases
bugs modalg_2(007) bug578_1, bug578_2, bug23004
are stable bad.

abv

2014-03-19 16:08

manager   ~0028360

1. Message in first test is still incorrect: the shape being tested (b_1) is not result of Boolean Operation but made by "box" command
2. and 3. are as expected

mkv

2014-03-20 11:51

tester   ~0028385

Dear abv,
1. Test case bugs/modalg_5(010)/bug24706 was corrected.
2. OK, branch CR24706 is TESTED.

Related Changesets

occt: master df80c6dd

2014-03-20 10:09:47

emv


Committer: bugmaster Details Diff
0024706: Solids produced by BOP do not have flag Closed set in shells

Flag CLOSED is set for closed shells created during perform of Boolean Operation.
Test cases for issue CR24706
Affected Issues
0024706
mod - src/BOPAlgo/BOPAlgo_ShellSplitter.cxx Diff File
add - tests/bugs/modalg_5/bug24706 Diff File

Issue History

Date Modified Username Field Change
2014-03-09 10:26 abv New Issue
2014-03-09 10:26 abv Assigned To => ifv
2014-03-09 10:26 abv Relationship added related to 0024521
2014-03-11 10:51 ifv Assigned To ifv => pkv
2014-03-11 10:51 ifv Status new => assigned
2014-03-12 13:38 ifv Assigned To pkv => emv
2014-03-14 13:44 emv Note Added: 0028281
2014-03-14 13:44 emv Assigned To emv => pkv
2014-03-14 13:44 emv Status assigned => resolved
2014-03-14 13:44 emv Additional Information Updated
2014-03-14 14:59 pkv Note Added: 0028284
2014-03-14 14:59 pkv Assigned To pkv => mkv
2014-03-14 14:59 pkv Status resolved => reviewed
2014-03-18 18:30 mkv Note Added: 0028330
2014-03-18 18:31 mkv Test case number => bugs modalg_5(010) bug24706
2014-03-18 18:31 mkv Assigned To mkv => emv
2014-03-18 18:31 mkv Status reviewed => feedback
2014-03-18 20:04 abv Note Added: 0028335
2014-03-19 09:01 abv Assigned To emv => mkv
2014-03-19 09:06 abv Note Added: 0028341
2014-03-19 15:58 mkv Note Added: 0028358
2014-03-19 15:58 mkv Assigned To mkv => abv
2014-03-19 16:08 abv Note Added: 0028360
2014-03-19 16:08 abv Status feedback => tested
2014-03-19 16:08 abv Assigned To abv => mkv
2014-03-20 11:51 mkv Note Added: 0028385
2014-03-20 11:53 mkv Assigned To mkv => bugmaster
2014-03-21 16:18 bugmaster Changeset attached => occt master df80c6dd
2014-03-21 16:18 bugmaster Status tested => verified
2014-03-21 16:18 bugmaster Resolution open => fixed
2014-05-05 13:33 aiv Status verified => closed
2014-05-05 13:38 aiv Fixed in Version => 6.7.1