Archived issue #0027015
Sewing returns invalid shape if some faces are nearly plane cones
Description
When sewing a couple of faces, which should form a closed solid, an invalid Shell is returned. checkshape says that some faces have self-intersecting wires. These faces are cones that are nearly planes. If These faces are modified to be real planes, sewing works fine. So, it seems to be connected with this type of geometry. I think it would be good, if sewing could handle such cases more robustly, returning a valid result.
It was reproduced on OCC 6.9.0 and 6.9.1 (win32, vc10). I didn't test it on current master.
It was reproduced on OCC 6.9.0 and 6.9.1 (win32, vc10). I didn't test it on current master.
Steps to reproduce
I Original case:
restore c2.brep c
tolerance c
sewing r 0.2 c
tolerance r
checkshape r
II Reduced case:
pload ALL
source d:/work/test
restore bug27015_ReducedShape.brep c
tolerance c
sewing r 0.2 c
checkshape r
#test bugs modalg_6 bug27015
restore c2.brep c
tolerance c
sewing r 0.2 c
tolerance r
checkshape r
II Reduced case:
pload ALL
source d:/work/test
restore bug27015_ReducedShape.brep c
tolerance c
sewing r 0.2 c
checkshape r
#test bugs modalg_6 bug27015
Public activity
46 archived notes
Participants are labeled by their role within this record.
I have found that p-curves in the resulting shape that are lying on the conical surface (the bottom of the shape) have bad form. The distance between 3D curve and p-curve is too big in some place:
Draw[158]> xdistcc2ds c c2 su 0 0.01 10
T=0 D=9.9476e-014
T=0.00111111 D=40.2688
T=0.00222222 D=84.2022
T=0.00333333 D=58.0557
T=0.00444444 D=14.2113
T=0.00555556 D=0.0696242
T=0.00666667 D=0.0278615
T=0.00777778 D=0.010187
T=0.00888889 D=7.93634e-005
T=0.01 D=1.95995e-005
Max distance = 84.2021756274906
Param = 0.00222222222222222
So, it is needed to find the problem in the code that makes p-curves for sewed edges.
Draw[158]> xdistcc2ds c c2 su 0 0.01 10
T=0 D=9.9476e-014
T=0.00111111 D=40.2688
T=0.00222222 D=84.2022
T=0.00333333 D=58.0557
T=0.00444444 D=14.2113
T=0.00555556 D=0.0696242
T=0.00666667 D=0.0278615
T=0.00777778 D=0.010187
T=0.00888889 D=7.93634e-005
T=0.01 D=1.95995e-005
Max distance = 84.2021756274906
Param = 0.00222222222222222
So, it is needed to find the problem in the code that makes p-curves for sewed edges.
Subshape of original shape attached. At the first glance root of the problem is degenerated cone (angle = pi / 2) on which bad edges lies.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Thu Dec 24 14:09:26 2015 +0300
0027015: Sewing returns invalid shape if some faces are nearly plane cones
Reparametrization algorithm fixes.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Thu Dec 24 14:09:26 2015 +0300
0027015: Sewing returns invalid shape if some faces are nearly plane cones
Reparametrization algorithm fixes.
Could the proposed solution be tested and possibly added to OCC 7.0 or are you still unsure about it or expect many regressions?
Hello Author,
This branch is in development state. This is caused by two reasons:
1) Your case is more complicated than at the first glance. Your input data have such big tolerance at the edge which should be shared.
2) Unfortunately, now we have not free resources to perform deep analysis to elaborate solution and implement it.
This branch is in development state. This is caused by two reasons:
1) Your case is more complicated than at the first glance. Your input data have such big tolerance at the edge which should be shared.
2) Unfortunately, now we have not free resources to perform deep analysis to elaborate solution and implement it.
This bug will be considered with low priority.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear msv,
Please check current state of the CR27015 branch.
Please check current state of the CR27015 branch.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Mon May 23 14:51:16 2016 +0300
Test case correction.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Mon May 23 14:51:16 2016 +0300
Test case correction.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
This fix is not complete (bad tolerance after sewing). Full solution will be implemented in scope of the #0027531.
Reviewed.
Dear Commenter 1,
Branch CR27015 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS: 0 (0 on master)
products component:
Linux: 72
Windows: 4
MacOS: 1140
Regressions/Differences:
occt component:
http://occt-tests/CR27015-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27015-master-OCCT/Windows-64-VC10/summary.html
products component:
http://occt-tests/CR27015-master-Products/Debian70-64/summary.html
http://occt-tests/CR27015-master-Products/Windows-64-VC10/summary.html
Testing cases:
bugs modalg_6 bug27015 - BAD (known problem)
http://occt-tests/CR27015-master-OCCT/Debian70-64/bugs/modalg_6/bug27015.html
http://occt-tests/CR27015-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug27015.html
CPU-problematic test cases have been detected:
bugs vis bug349_1: 0.9984064 / 0.1404009 [+611.11%]
bugs vis bug23670_1: 1.1544074 / 0.2964019 [+289.47%]
bugs vis bug349: 0.780005 / 0.2028013 [+284.62%]
bugs vis bug24412_2: 1.4352092 / 0.156001 [+820.00%]
bugs vis bug23253: 0.9672062 / 0.2808018 [+244.44%]
bugs vis bug21091_3: 0.9516061 / 0.3276021 [+190.48%]
bugs vis bug22368: 0.8112052 / 0.2340015 [+246.67%]
bugs vis bug71: 1.8408118 / 0.6396041 [+187.80%]
bugs vis bug24351_2: 1.3260085 / 0.7020045 [+88.89%]
bugs vis bug23747_2: 1.1856076 / 0.5928038 [+100.00%]
bugs vis bug136: 1.6692107 / 0.1872012 [+791.67%]
bugs vis bug22879: 1.4352092 / 0.2184014 [+557.14%]
bugs vis bug24389: 2.8392182 / 0.7176046 [+295.65%]
bugs vis bug7186: 0.7020045 / 0.1092007 [+542.86%]
bugs vis bug280_3: 0.936006 / 0.0936006 [+900.00%]
bugs vis bug1786: 0.6708043 / 0.1248008 [+437.50%]
bugs vis bug24351_4: 1.2948083 / 0.6552042 [+97.62%]
bugs vis bug74: 1.1856076 / 0.5148033 [+130.30%]
bugs vis bug23670_2: 0.9984064 / 0.2184014 [+357.14%]
bugs vis buc60632_1: 0.8736056 / 0.2496016 [+250.00%]
bugs vis bug23225: 0.9672062 / 0.1716011 [+463.64%]
bugs vis bug21091_6: 0.7488048 / 0.1404009 [+433.33%]
bugs vis bug25760_2: 4.3992282 / 2.0748133 [+112.03%]
bugs vis bug270_2: 0.8424054 / 0.1092007 [+671.43%]
bugs vis bug113: 0.8424054 / 0.1092007 [+671.43%]
bugs vis bug25540: 1.0296066 / 0.2652017 [+288.24%]
bugs vis bug27318: 5.8188373 / 3.1980205 [+81.95%]
bugs vis bug204_1: 1.2792082 / 0.156001 [+720.00%]
bugs vis bug24133_4: 0.7020045 / 0.156001 [+350.00%]
bugs vis buc60632_2: 1.1856076 / 0.1872012 [+533.33%]
bugs vis bug270_1: 0.7176046 / 0.1716011 [+318.18%]
bugs vis bug2883_2: 0.7176046 / 0.1716011 [+318.18%]
Testing on Linux:
Total MEMORY difference: 86940070 / 87112130 [-0.20%]
Total CPU difference: 18666.039999999757 / 18983.309999999863 [-1.67%]
Testing on Windows:
Total MEMORY difference: 54653451 / 54694713 [-0.08%]
Total CPU difference: 17700.747065598876 / 17936.09017419895 [-1.31%]
There are following differences in images found by testdiff:
http://occt-tests/CR27015-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27015-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10.html
sewing tol_100 C5
sewing tol_100 J4
bugs modalg_6 bug26288
Branch CR27015 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS: 0 (0 on master)
products component:
Linux: 72
Windows: 4
MacOS: 1140
Regressions/Differences:
occt component:
http://occt-tests/CR27015-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27015-master-OCCT/Windows-64-VC10/summary.html
products component:
http://occt-tests/CR27015-master-Products/Debian70-64/summary.html
http://occt-tests/CR27015-master-Products/Windows-64-VC10/summary.html
Testing cases:
bugs modalg_6 bug27015 - BAD (known problem)
http://occt-tests/CR27015-master-OCCT/Debian70-64/bugs/modalg_6/bug27015.html
http://occt-tests/CR27015-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug27015.html
CPU-problematic test cases have been detected:
bugs vis bug349_1: 0.9984064 / 0.1404009 [+611.11%]
bugs vis bug23670_1: 1.1544074 / 0.2964019 [+289.47%]
bugs vis bug349: 0.780005 / 0.2028013 [+284.62%]
bugs vis bug24412_2: 1.4352092 / 0.156001 [+820.00%]
bugs vis bug23253: 0.9672062 / 0.2808018 [+244.44%]
bugs vis bug21091_3: 0.9516061 / 0.3276021 [+190.48%]
bugs vis bug22368: 0.8112052 / 0.2340015 [+246.67%]
bugs vis bug71: 1.8408118 / 0.6396041 [+187.80%]
bugs vis bug24351_2: 1.3260085 / 0.7020045 [+88.89%]
bugs vis bug23747_2: 1.1856076 / 0.5928038 [+100.00%]
bugs vis bug136: 1.6692107 / 0.1872012 [+791.67%]
bugs vis bug22879: 1.4352092 / 0.2184014 [+557.14%]
bugs vis bug24389: 2.8392182 / 0.7176046 [+295.65%]
bugs vis bug7186: 0.7020045 / 0.1092007 [+542.86%]
bugs vis bug280_3: 0.936006 / 0.0936006 [+900.00%]
bugs vis bug1786: 0.6708043 / 0.1248008 [+437.50%]
bugs vis bug24351_4: 1.2948083 / 0.6552042 [+97.62%]
bugs vis bug74: 1.1856076 / 0.5148033 [+130.30%]
bugs vis bug23670_2: 0.9984064 / 0.2184014 [+357.14%]
bugs vis buc60632_1: 0.8736056 / 0.2496016 [+250.00%]
bugs vis bug23225: 0.9672062 / 0.1716011 [+463.64%]
bugs vis bug21091_6: 0.7488048 / 0.1404009 [+433.33%]
bugs vis bug25760_2: 4.3992282 / 2.0748133 [+112.03%]
bugs vis bug270_2: 0.8424054 / 0.1092007 [+671.43%]
bugs vis bug113: 0.8424054 / 0.1092007 [+671.43%]
bugs vis bug25540: 1.0296066 / 0.2652017 [+288.24%]
bugs vis bug27318: 5.8188373 / 3.1980205 [+81.95%]
bugs vis bug204_1: 1.2792082 / 0.156001 [+720.00%]
bugs vis bug24133_4: 0.7020045 / 0.156001 [+350.00%]
bugs vis buc60632_2: 1.1856076 / 0.1872012 [+533.33%]
bugs vis bug270_1: 0.7176046 / 0.1716011 [+318.18%]
bugs vis bug2883_2: 0.7176046 / 0.1716011 [+318.18%]
Testing on Linux:
Total MEMORY difference: 86940070 / 87112130 [-0.20%]
Total CPU difference: 18666.039999999757 / 18983.309999999863 [-1.67%]
Testing on Windows:
Total MEMORY difference: 54653451 / 54694713 [-0.08%]
Total CPU difference: 17700.747065598876 / 17936.09017419895 [-1.31%]
There are following differences in images found by testdiff:
http://occt-tests/CR27015-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27015-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10.html
sewing tol_100 C5
sewing tol_100 J4
bugs modalg_6 bug26288
Dear aml,
Branch [archived branch] has been rejected due to:
- regressions/differences/improvements
- CPU problem
- differences in images
Branch [archived branch] has been rejected due to:
- regressions/differences/improvements
- CPU problem
- differences in images
Dear msv,
I CPU-problem
"vis" cases are not affected by fix, so it is local fluctuation.
I've checked some of cases manually, modified code is not called at all.
II Difference in images
difference in "sewing" tests is acceptable since test tolerance in too big.
bugs modalg_6 bug26288 - difference is caused unsupported input data and the result is acceptable (one BAD state changed to another BAD state).
I CPU-problem
"vis" cases are not affected by fix, so it is local fluctuation.
I've checked some of cases manually, modified code is not called at all.
II Difference in images
difference in "sewing" tests is acceptable since test tolerance in too big.
bugs modalg_6 bug26288 - difference is caused unsupported input data and the result is acceptable (one BAD state changed to another BAD state).
Dear Alexander, please check all failed tests for CPU problem.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Wed May 25 11:46:59 2016 +0300
Minor correction.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Wed May 25 11:46:59 2016 +0300
Minor correction.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Thu Dec 24 14:09:26 2015 +0300
0027015: Sewing returns invalid shape if some faces are nearly plane cones
Interpolation state check is fixed to mark as valid only ordered sequences of poles.
Refactoring of Approx_SameParameter.cxx.
Test case is added.
Test cases are updated to the new behavior.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Thu Dec 24 14:09:26 2015 +0300
0027015: Sewing returns invalid shape if some faces are nearly plane cones
Interpolation state check is fixed to mark as valid only ordered sequences of poles.
Refactoring of Approx_SameParameter.cxx.
Test case is added.
Test cases are updated to the new behavior.
Dear msv,
Please check current state of the CR27015 branch. Branch CR27015_2 contains the same modifications but commits are squashed into single one.
CR27015_2 branch should be used for testing.
Please check current state of the CR27015 branch. Branch CR27015_2 contains the same modifications but commits are squashed into single one.
CR27015_2 branch should be used for testing.
src\Approx\Approx_SameParameter.cxx
- variable on line 864 is not used.
- 874: "we will not can get" => "we will not be able to get"
- 881; why not to get value of aHCurve2d? The same is on line 736.
- variable on line 864 is not used.
- 874: "we will not can get" => "we will not be able to get"
- 881; why not to get value of aHCurve2d? The same is on line 736.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Tue May 31 07:41:05 2016 +0300
Remarks correction.
[revision removed]
Detailed log of new commits:
Author: aml
Date: Tue May 31 07:41:05 2016 +0300
Remarks correction.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear msv,
Please check current state of the CR27015 branch. Branch CR27015_2 contains the same modifications but commits are squashed into single one.
CR27015_2 branch should be used for testing.
Please check current state of the CR27015 branch. Branch CR27015_2 contains the same modifications but commits are squashed into single one.
CR27015_2 branch should be used for testing.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Reviewed.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear Commenter 1, please test CR27015_2.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been rebased on the current master
Dear Commenter 1,
Branch CR27015_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS: 0 (0 on master)
products component:
Linux: 72
Windows: 4
MacOS: 1131
Regressions/Differences:
http://occt-tests/CR27015_2-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27015_2-master-OCCT/Windows-64-VC10/summary.html
sewing tol_100 I9
http://occt-tests/CR27015_2-master-Products/Debian70-64/summary.html
http://occt-tests/CR27015_2-master-Products/Windows-64-VC10/summary.html
parasolid doc_3 E3 (Windows only)
sat doc_6 G7, I1
Testing cases:
bugs modalg_6 bug27015 - BAD (known problem)
http://occt-tests/CR27015_2-master-OCCT/Debian70-64/bugs/modalg_6/bug27015.html
http://occt-tests/CR27015_2-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug27015.html
Testing on Linux:
Total MEMORY difference: 88686702 / 89041423 [-0.40%]
Total CPU difference: 19595.650000000256 / 19438.53 [+0.81%]
Testing on Windows:
Total MEMORY difference: 55973170 / 55975124 [-0.00%]
Total CPU difference: 18186.814981398853 / 18452.09468189878 [-1.44%]
There are following differences in images found by testdiff:
http://occt-tests/CR27015_2-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27015_2-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10.html
sewing tol_100 C5
sewing tol_100 J4
bugs modalg_6 bug26288
new differences:
offset with_intersect_80 K1
offset with_intersect_80 L6
Branch CR27015_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS: 0 (0 on master)
products component:
Linux: 72
Windows: 4
MacOS: 1131
Regressions/Differences:
http://occt-tests/CR27015_2-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27015_2-master-OCCT/Windows-64-VC10/summary.html
sewing tol_100 I9
http://occt-tests/CR27015_2-master-Products/Debian70-64/summary.html
http://occt-tests/CR27015_2-master-Products/Windows-64-VC10/summary.html
parasolid doc_3 E3 (Windows only)
sat doc_6 G7, I1
Testing cases:
bugs modalg_6 bug27015 - BAD (known problem)
http://occt-tests/CR27015_2-master-OCCT/Debian70-64/bugs/modalg_6/bug27015.html
http://occt-tests/CR27015_2-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug27015.html
Testing on Linux:
Total MEMORY difference: 88686702 / 89041423 [-0.40%]
Total CPU difference: 19595.650000000256 / 19438.53 [+0.81%]
Testing on Windows:
Total MEMORY difference: 55973170 / 55975124 [-0.00%]
Total CPU difference: 18186.814981398853 / 18452.09468189878 [-1.44%]
There are following differences in images found by testdiff:
http://occt-tests/CR27015_2-master-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27015_2-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10.html
sewing tol_100 C5
sewing tol_100 J4
bugs modalg_6 bug26288
new differences:
offset with_intersect_80 K1
offset with_intersect_80 L6
Dear Alexander,
Branch [archived branch] has been rejected due to:
- regressions/differences/improvements
- differences in images
Branch [archived branch] has been rejected due to:
- regressions/differences/improvements
- differences in images
Dear apv,
I
Failed tests are OK. Could you please update reference data?
II
difference in "sewing" tests are acceptable since test tolerance in too big.
bugs modalg_6 bug26288 - difference is caused unsupported input data and the result is acceptable (one BAD state changed to another BAD state).
These offset tests are unstable and change from master to master.
I
Failed tests are OK. Could you please update reference data?
II
difference in "sewing" tests are acceptable since test tolerance in too big.
bugs modalg_6 bug26288 - difference is caused unsupported input data and the result is acceptable (one BAD state changed to another BAD state).
These offset tests are unstable and change from master to master.
Branch [archived branch] has been created in products git-repository
Dear Sergey,
Please, validate correction of test cases in branch CR27015 of products git-repository.
Please, validate correction of test cases in branch CR27015 of products git-repository.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
I validate the modifications of Products tests in the branch CR27015.
Dear Andrey,
Please, validate correction of test cases in branch CR27015_2 of occt git-repository.
Please, validate correction of test cases in branch CR27015_2 of occt git-repository.
The changes in tests look acceptable taking into account the nature of the changes made
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Yes, problem is fixed in OCC 7.1.0 beta.
Related records
- #0023126 · related to · closedCommand thrusection produce incorrect results on thrusection test.
- #0023127 · related to · newFix tests produce incorrect results.
- #0027531 · related to · closedModeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust
- #0027705 · related to · assignedModeling Algorithms - Boolean operation returns empty compound for a shape containing a nearly plane cone
- #0027753 · related to · closedNearly plane cones should not be created by BRepPrimAPI_MakeRevol