View Issue Details

IDProjectCategoryView StatusLast Update
0024397Open CASCADEOCCT:Modeling Algorithmspublic2023-08-01 15:08
ReporteremvAssigned Toifv 
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version6.6.0 
Target VersionUnscheduled 
Summary0024397: BRepBuilderAPI_Copy works not correct
DescriptionBRepBuilderAPI_Copy works not correct with some shapes.
Steps To Reproduce1. the problem described in the test case boolean bcommon_2d A7
restore [locate_data_file case_1_wire3.brep] b
lprops b
tcopy b b1
lprops b1
#An exception was caught 006C429C : Standard_NullObject: BRepAdaptor_Curve::No geometry
#** Exception ** 006C429C : Standard_NullObject: BRepAdaptor_Curve::No geometry

2. the problem described in the test case bugs modalg_2 bug476_7
restore [locate_data_file OCC485b.brep] b
nbshapes b
# VERTEX : 3
# EDGE : 6
# WIRE : 4
# FACE : 4
tcopy b b1
nbshapes b1
# VERTEX : 6
# EDGE : 9
# WIRE : 5
# FACE : 5

3. the problem described in the test case bugs modalg_2 bug22678
brestore [locate_data_file bug22678_objCut.brep] b
nbshapes b
# VERTEX : 8
# EDGE : 12
# WIRE : 11
# FACE : 9
tcopy b b1
nbshapes b1
# VERTEX : 12
# EDGE : 19
# WIRE : 13
# FACE : 11
TagsNo tags attached.
Test case numberbugs modalg_5 bug24397_1, bug24397_2, bug24397_3

Relationships

parent of 0027063 closedabv BRepGProps raises exception on edge with no curves 

Activities

ifv

2013-12-10 15:57

developer   ~0027156

Please review branch CR24397

The first problem is fixed (see branch CR24397)
2 and 3 examplex are not bugs:
nbshapes take in account only different TShapes, but number of Shapes is more.
Algorithm of BRepBuilderAPI_Copy copies each shape, so after copiing number of shapes increased because now each Shape has own TShape.

jgv

2013-12-10 16:29

developer   ~0027158

No remarks.

apn

2013-12-11 15:55

administrator   ~0027172

Dear BugMaster,

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

Number of compiler warnings:

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

products component :
Linux: 21 (21 on master)
Windows: 8 (8 on master)

Regressions/Differences:
blend complex D4
http://occt-tests/CR24397-master-occt/Debian60-64/blend/complex/D4.html
http://occt-tests/CR24397-master-occt/Windows-32-VC9/blend/complex/D4.html

Testing cases:
bugs modalg_5 bug24397 - OK
http://occt-tests/CR24397-master-occt/Debian60-64/bugs/modalg_5/bug24397_1.html
http://occt-tests/CR24397-master-occt/Windows-32-VC9/bugs/modalg_5/bug24397_1.html

Testing on Linux:
Total MEMORY difference: 358227524 / 358815008
Total CPU difference: 43385.850000000246 / 67594.15000000007

Testing on Windows:
Total MEMORY difference: 413074624 / 413199408
Total CPU difference: 28030.078125 / 30599.515625

There are not differences in images found by testdiff.

ifv

2013-12-12 18:20

developer   ~0027194

Please review updated CR24397

jgv

2013-12-12 18:42

developer   ~0027195

Ok.

apn

2013-12-13 14:30

administrator   ~0027208

Dear BugMaster,

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

Number of compiler warnings:

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

products component :
Linux: 21 (21 on master)
Windows: 8 (8 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
bugs modalg_5 bug24397 - OK
http://occt-tests/CR24397-master-occt/Debian60-64/bugs/modalg_5/bug24397.html
http://occt-tests/CR24397-master-occt/Windows-32-VC9/bugs/modalg_5/bug24397.html

Testing on Linux:
Total MEMORY difference: 358902548 / 358958380
Total CPU difference: 47639.15000000007 / 67597.07000000007

Testing on Windows:
Total MEMORY difference: 413061768 / 413232620
Total CPU difference: 30182.84375 / 30599.546875

There are not differences in images found by testdiff.

abv

2016-01-08 01:02

manager   ~0049724

The fix for lprops is separated to new issue, 0027063.

That fix does not prevent BRepBuilderAPI_Copy to construct problematic edge (degenerated edge with no pcurves). I suppose that BRepBuilderAPI_Copy behaves correctly: it copies the degenerated edge as it is, but does not copy pcurves on faces which are not part of the original shape. Copy operation is expected to preserve topological structure of the result shape to be exactly as in the source, thus it may not eliminate null edges from the result. Thus the edge is copied correctly, the difference between original edge and result is that the former contains a pcurve, which is skipped in the result since the copied shape is wire.

The inconsistency remains between original shape which is considered valid, and result of the copy operation which is not valid:

restore [locate_data_file case_1_wire3.brep] a
checkshape a ;# OK
tcopy a b
checkshape b ;# fail

I suppose that checkshape should report error in both cases here (degenerated edge may not be part of wire unless it is part of the face).

msv

2016-01-08 20:06

developer   ~0049731

Dear Igor, please implement the fix for checkshape as Andrey suggested.

@Andrey: My one concern is: if we take a wire of a face with degeneracy then checkshape will report an error on such wire. Is this OK then?

abv

2016-01-08 20:22

manager   ~0049735

Last edited: 2016-01-08 20:23

Yep, naturally, these wires will be invalid. I suppose we shall need a tool to bring such wires into valid state (by removing degenerated edges). Alternatively, we can allow degenerated edges with no curves in such wires, then checkshape should be fixed to not fail on such shapes.

msv

2016-01-09 00:49

developer   ~0049745

I think the natural entry point for such tool should be fixshape. By default it will remove degenerated edges from wires not belonging to a face.

mkv

2017-11-02 12:23

tester   ~0071930

Problem is reproduced on the current master.

Issue History

Date Modified Username Field Change
2013-11-22 14:43 emv New Issue
2013-11-22 14:43 emv Assigned To => ifv
2013-11-22 14:47 emv Status new => assigned
2013-11-22 14:47 emv Steps to Reproduce Updated
2013-12-10 15:57 ifv Note Added: 0027156
2013-12-10 15:57 ifv Assigned To ifv => jgv
2013-12-10 15:57 ifv Status assigned => resolved
2013-12-10 16:29 jgv Note Added: 0027158
2013-12-10 16:29 jgv Status resolved => reviewed
2013-12-10 16:35 apn Assigned To jgv => apn
2013-12-11 15:55 apn Note Added: 0027172
2013-12-11 15:56 apn Test case number => bugs modalg_5 bug24397
2013-12-11 15:56 apn Assigned To apn => ifv
2013-12-11 15:56 apn Status reviewed => assigned
2013-12-12 18:20 ifv Note Added: 0027194
2013-12-12 18:20 ifv Assigned To ifv => jgv
2013-12-12 18:20 ifv Status assigned => resolved
2013-12-12 18:42 jgv Note Added: 0027195
2013-12-12 18:42 jgv Status resolved => reviewed
2013-12-12 19:07 apn Assigned To jgv => apn
2013-12-13 14:30 apn Note Added: 0027208
2013-12-13 14:30 apn Assigned To apn => bugmaster
2013-12-13 14:30 apn Status reviewed => tested
2013-12-13 14:30 apn Target Version => 6.7.1
2013-12-19 13:34 bugmaster Assigned To bugmaster => abv
2013-12-19 13:34 bugmaster Status tested => feedback
2014-04-04 17:42 abv Target Version 6.7.1 => 6.8.0
2014-09-11 09:23 abv Target Version 6.8.0 => 7.1.0
2016-01-07 23:50 abv File Added: bug24397_emptyedge.brep
2016-01-08 00:27 abv Relationship added parent of 0027063
2016-01-08 01:02 abv Note Added: 0049724
2016-01-08 01:02 abv Assigned To abv => msv
2016-01-08 01:10 abv File Deleted: bug24397_emptyedge.brep
2016-01-08 20:06 msv Note Added: 0049731
2016-01-08 20:06 msv Assigned To msv => ifv
2016-01-08 20:06 msv Status feedback => assigned
2016-01-08 20:22 abv Note Added: 0049735
2016-01-08 20:23 abv Note Edited: 0049735
2016-01-09 00:49 msv Note Added: 0049745
2016-10-28 11:54 msv Target Version 7.1.0 => 7.2.0
2017-07-24 09:32 msv Target Version 7.2.0 => 7.3.0
2017-11-02 12:23 mkv Test case number bugs modalg_5 bug24397 => bugs modalg_5 bug24397_1, bug24397_2, bug24397_3
2017-11-02 12:23 mkv Note Added: 0071930
2017-12-05 17:08 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:37 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:58 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:53 msv Target Version 7.6.0 => 7.7.0
2022-10-24 10:42 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:08 dpasukhi Target Version 7.8.0 => Unscheduled