MantisBT - Community
View Issue Details
0027015Community[OCCT] OCCT:Modeling Algorithmspublic2015-12-18 18:502016-12-09 16:39
Timo 
bugmaster 
lowminor 
closedfixed 
[OCCT] 6.9.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs modalg_6 bug27015
0027015: Sewing returns invalid shape if some faces are nearly plane cones
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.
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
No tags attached.
related to 0023126closed bugmaster Open CASCADE Command thrusection produce incorrect results on thrusection test. 
related to 0023127new jgv Open CASCADE Fix tests produce incorrect results. 
related to 0027531verified bugmaster Open CASCADE Modeling Algorithms - Make the algorithm Approx_SameParameter more clear and robust 
related to 0027705assigned msv Community Modeling Algorithms - Boolean operation returns empty compound for a shape containing a nearly plane cone 
related to 0027753closed bugmaster Community Nearly plane cones should not be created by BRepPrimAPI_MakeRevol 
zip c2.zip (489,977) 2015-12-18 18:50
https://tracker.dev.opencascade.org/
? bug27015.brep (1,344,727) 2016-05-23 11:28
https://tracker.dev.opencascade.org/
Issue History
2015-12-18 18:50TimoNew Issue
2015-12-18 18:50TimoAssigned To => msv
2015-12-18 18:50TimoFile Added: c2.zip
2015-12-18 18:51TimoDescription Updatedbug_revision_view_page.php?rev_id=12606#r12606
2015-12-21 12:33msvNote Added: 0049351
2015-12-21 12:33msvAssigned Tomsv => aml
2015-12-21 12:33msvStatusnew => assigned
2015-12-21 12:33msvTarget Version7.0.0 => 7.1.0
2015-12-22 13:20amlFile Added: bug27015_ReducedShape.brep
2015-12-22 13:22amlSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12633#r12633
2015-12-22 13:26amlNote Added: 0049429
2015-12-24 14:14gitNote Added: 0049562
2016-02-12 14:44TimoNote Added: 0050688
2016-02-15 17:37amlNote Added: 0050767
2016-02-15 17:56msvNote Added: 0050771
2016-02-15 17:56msvPrioritynormal => low
2016-05-20 11:37gitNote Added: 0054159
2016-05-20 14:57gitNote Added: 0054249
2016-05-23 11:25amlFile Deleted: bug27015_ReducedShape.brep
2016-05-23 11:27gitNote Added: 0054271
2016-05-23 11:27gitNote Added: 0054272
2016-05-23 11:28amlFile Added: bug27015.brep
2016-05-23 11:29amlNote Added: 0054273
2016-05-23 11:29amlAssigned Toaml => msv
2016-05-23 11:29amlStatusassigned => resolved
2016-05-23 12:12amlRelationship addedrelated to 0027531
2016-05-23 14:51gitNote Added: 0054287
2016-05-23 14:56gitNote Added: 0054290
2016-05-23 15:01amlNote Added: 0054291
2016-05-23 15:04msvNote Added: 0054292
2016-05-23 15:04msvAssigned Tomsv => bugmaster
2016-05-23 15:04msvStatusresolved => reviewed
2016-05-23 15:26apvAssigned Tobugmaster => apv
2016-05-24 17:06apvNote Added: 0054362
2016-05-24 17:06apvAssigned Toapv => aml
2016-05-24 17:06apvStatusreviewed => assigned
2016-05-24 17:09apvNote Added: 0054363
2016-05-24 17:36apvTest case number => bugs modalg_6 bug27015
2016-05-25 09:52amlNote Added: 0054373
2016-05-25 09:52amlAssigned Toaml => msv
2016-05-25 09:52amlStatusassigned => resolved
2016-05-25 11:41msvNote Added: 0054376
2016-05-25 11:41msvAssigned Tomsv => aml
2016-05-25 11:41msvStatusresolved => assigned
2016-05-25 11:50gitNote Added: 0054377
2016-05-27 16:51gitNote Added: 0054506
2016-05-30 12:57gitNote Added: 0054526
2016-05-30 13:00gitNote Added: 0054527
2016-05-30 13:02amlRelationship addedrelated to 0023126
2016-05-30 13:02amlRelationship addedrelated to 0023127
2016-05-30 13:04amlNote Added: 0054529
2016-05-30 13:04amlAssigned Toaml => msv
2016-05-30 13:04amlStatusassigned => resolved
2016-05-30 13:04amlSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13789#r13789
2016-05-30 17:06msvNote Added: 0054542
2016-05-30 17:06msvAssigned Tomsv => aml
2016-05-30 17:06msvStatusresolved => assigned
2016-05-31 07:41gitNote Added: 0054548
2016-05-31 07:43gitNote Added: 0054549
2016-05-31 07:44amlNote Added: 0054550
2016-05-31 07:44amlAssigned Toaml => msv
2016-05-31 07:44amlStatusassigned => resolved
2016-05-31 09:46gitNote Added: 0054552
2016-05-31 09:48msvNote Added: 0054553
2016-05-31 09:48msvAssigned Tomsv => bugmaster
2016-05-31 09:48msvStatusresolved => reviewed
2016-05-31 09:49gitNote Added: 0054554
2016-05-31 09:51msvNote Added: 0054555
2016-05-31 10:16apvAssigned Tobugmaster => apv
2016-05-31 10:26gitNote Added: 0054557
2016-05-31 10:27apvNote Added: 0054559
2016-05-31 16:03apvNote Added: 0054574
2016-05-31 16:03apvAssigned Toapv => aml
2016-05-31 16:03apvStatusreviewed => assigned
2016-05-31 16:06apvNote Added: 0054575
2016-06-01 07:39amlNote Added: 0054586
2016-06-01 07:39amlAssigned Toaml => apv
2016-06-01 07:39amlStatusassigned => feedback
2016-06-01 07:40amlNote Edited: 0054586bug_revision_view_page.php?bugnote_id=54586#r13805
2016-06-02 10:16apvNote Added: 0054615
2016-06-02 10:17apvAssigned Toapv => szv
2016-06-02 10:19apvNote Added: 0054616
2016-06-02 10:23gitNote Added: 0054619
2016-06-02 10:24szvNote Added: 0054620
2016-06-02 10:24szvAssigned Toszv => apv
2016-06-02 10:24szvStatusfeedback => assigned
2016-06-02 10:25apvAssigned Toapv => abv
2016-06-02 10:26apvNote Added: 0054621
2016-06-02 10:26apvStatusassigned => feedback
2016-06-02 13:59abvNote Added: 0054629
2016-06-02 13:59abvAssigned Toabv => bugmaster
2016-06-02 14:02apvStatusfeedback => tested
2016-06-03 12:50bugmasterChangeset attached => occt master 52db4751
2016-06-03 12:50bugmasterStatustested => verified
2016-06-03 12:50bugmasterResolutionopen => fixed
2016-06-03 13:12gitNote Added: 0054662
2016-06-03 13:12gitNote Added: 0054667
2016-07-22 15:46TimoRelationship addedrelated to 0027705
2016-08-08 10:15TimoRelationship addedrelated to 0027753
2016-11-17 13:43TimoNote Added: 0060492
2016-12-09 16:30aivStatusverified => closed
2016-12-09 16:39aivFixed in Version => 7.1.0

Notes
(0049351)
msv   
2015-12-21 12:33   
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.
(0049429)
aml   
2015-12-22 13:26   
Subshape of original shape attached. At the first glance root of the problem is degenerated cone (angle = pi / 2) on which bad edges lies.
(0049562)
git   
2015-12-24 14:14   
Branch CR27015 has been created by aml.

SHA-1: cc1db98047115e53079445d0545ba9e10581da3c


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.
(0050688)
Timo   
2016-02-12 14:44   
Could the proposed solution be tested and possibly added to OCC 7.0 or are you still unsure about it or expect many regressions?
(0050767)
aml   
2016-02-15 17:37   
Hello Timo,

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.
(0050771)
msv   
2016-02-15 17:56   
This bug will be considered with low priority.
(0054159)
git   
2016-05-20 11:37   
Branch CR27015 has been updated forcibly by aml.

SHA-1: d849237343731409c1b751cb16a7503287c69aeb
(0054249)
git   
2016-05-20 14:57   
Branch CR27015 has been updated forcibly by aml.

SHA-1: 84d73a48cfbf88b42bc849ee6e48350b344bed51
(0054271)
git   
2016-05-23 11:27   
Branch CR27015 has been updated forcibly by aml.

SHA-1: cbfea547c8201ca642f060d610173809d89a1f76
(0054272)
git   
2016-05-23 11:27   
Branch CR27015 has been updated forcibly by aml.

SHA-1: 2357cad081d0cb23131a06e7cd90a30dd5cc7ce0
(0054273)
aml   
2016-05-23 11:29   
Dear msv,
Please check current state of the CR27015 branch.
(0054287)
git   
2016-05-23 14:51   
Branch CR27015 has been updated by aml.

SHA-1: 48c298fdbe840cff47bc2ee03a5a2c8bad472d05


Detailed log of new commits:

Author: aml
Date: Mon May 23 14:51:16 2016 +0300

    Test case correction.

(0054290)
git   
2016-05-23 14:56   
Branch CR27015 has been updated forcibly by aml.

SHA-1: 85fb8a2bca9a040513594a2c438e830ba27a4d93
(0054291)
aml   
2016-05-23 15:01   
This fix is not complete (bad tolerance after sewing). Full solution will be implemented in scope of the 0027531.
(0054292)
msv   
2016-05-23 15:04   
Reviewed.
(0054362)
apv   
2016-05-24 17:06   
Dear BugMaster,

Branch CR27015 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 85fb8a2bca9a040513594a2c438e830ba27a4d93

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
(0054363)
apv   
2016-05-24 17:09   
Dear aml,

Branch CR27015 has been rejected due to:
- regressions/differences/improvements
- CPU problem
- differences in images
(0054373)
aml   
2016-05-25 09:52   
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).
(0054376)
msv   
2016-05-25 11:41   
Dear Alexander, please check all failed tests for CPU problem.
(0054377)
git   
2016-05-25 11:50   
Branch CR27015 has been updated by aml.

SHA-1: 5a714c551a887159525bc587c8cf9bab149a4b64


Detailed log of new commits:

Author: aml
Date: Wed May 25 11:46:59 2016 +0300

    Minor correction.

(0054506)
git   
2016-05-27 16:51   
Branch CR27015 has been updated forcibly by aml.

SHA-1: b50a13b414489a23cc07428dc19015da6502934c
(0054526)
git   
2016-05-30 12:57   
Branch CR27015 has been updated forcibly by aml.

SHA-1: 4ff353b28cb2cc1f6d28936d4b2b864414402f71
(0054527)
git   
2016-05-30 13:00   
Branch CR27015_2 has been created by aml.

SHA-1: f2829813f0e9af3a4a0bd8d93a329e54b8e9df98


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.
(0054529)
aml   
2016-05-30 13:04   
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.
(0054542)
msv   
2016-05-30 17:06   
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.
(0054548)
git   
2016-05-31 07:41   
Branch CR27015 has been updated by aml.

SHA-1: 869f8b16ba77fc69cd525538cd87073bc65b1184


Detailed log of new commits:

Author: aml
Date: Tue May 31 07:41:05 2016 +0300

    Remarks correction.

(0054549)
git   
2016-05-31 07:43   
Branch CR27015_2 has been updated forcibly by aml.

SHA-1: f9b26df969c795b68625fc0777748cfc727e6e16
(0054550)
aml   
2016-05-31 07:44   
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.
(0054552)
git   
2016-05-31 09:46   
Branch CR27015 has been updated forcibly by aml.

SHA-1: dce460f90be639912fdb6dc6dba627ee39e560f6
(0054553)
msv   
2016-05-31 09:48   
Reviewed.
(0054554)
git   
2016-05-31 09:49   
Branch CR27015_2 has been updated forcibly by aml.

SHA-1: 12813bc21eb538ce3dc883d4b6eb2146efd1639b
(0054555)
msv   
2016-05-31 09:51   
Dear bugmaster, please test CR27015_2.
(0054557)
git   
2016-05-31 10:26   
Branch CR27015_2 has been updated forcibly by apv.

SHA-1: 19e795d2403e89f28622f0cf804c817292e2eecb
(0054559)
apv   
2016-05-31 10:27   
Branch CR27015_2 has been rebased on the current master
(0054574)
apv   
2016-05-31 16:03   
Dear BugMaster,

Branch CR27015_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 19e795d2403e89f28622f0cf804c817292e2eecb

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
(0054575)
apv   
2016-05-31 16:06   
Dear Alexander,

Branch CR27015_2 has been rejected due to:
- regressions/differences/improvements
- differences in images
(0054586)
aml   
2016-06-01 07:39   
(edited on: 2016-06-01 07:40)
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.

(0054615)
apv   
2016-06-02 10:16   
Branch CR27015 has been created in products git-repository
(0054616)
apv   
2016-06-02 10:19   
Dear Sergey,

Please, validate correction of test cases in branch CR27015 of products git-repository.
(0054619)
git   
2016-06-02 10:23   
Branch CR27015_2 has been updated forcibly by apv.

SHA-1: 7543d66fd5a6652da353db9800b4a034c8c49859
(0054620)
szv   
2016-06-02 10:24   
I validate the modifications of Products tests in the branch CR27015.
(0054621)
apv   
2016-06-02 10:26   
Dear Andrey,

Please, validate correction of test cases in branch CR27015_2 of occt git-repository.
(0054629)
abv   
2016-06-02 13:59   
The changes in tests look acceptable taking into account the nature of the changes made
(0054662)
git   
2016-06-03 13:12   
Branch CR27015_2 has been deleted by inv.

SHA-1: 7543d66fd5a6652da353db9800b4a034c8c49859
(0054667)
git   
2016-06-03 13:12   
Branch CR27015 has been deleted by inv.

SHA-1: dce460f90be639912fdb6dc6dba627ee39e560f6
(0060492)
Timo   
2016-11-17 13:43   
Yes, problem is fixed in OCC 7.1.0 beta.