MantisBT - Open CASCADE
View Issue Details
0030346Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2018-11-06 18:042019-10-07 08:13
kgv 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 5.0.0 
[OCCT] 7.4.0 
bugs/modalg_7/bug30346_1, bugs/modalg_7/bug30346_2
0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation::MakeEmptyVertex"
Test case bugs/moddata_2/bug65 throws "BRepSweep_Translation::MakeEmptyVertex" exception within BRepSweep_Rotation::MakeEmptyVertex() method when exceptions are preserved (DEBUG build or No_Exception undefined).

Although #0000065 specifies, that the original issue will NOT be fixed,
it doesn't look reasonable keeping a broken test case in OCCT.
Either, the bug should be fixed, or test case removed / adopted.

Notice also a misprint in exception text specifying wrong class name, which should be also corrected:
TopoDS_Shape  BRepSweep_Rotation::MakeEmptyVertex
  (const TopoDS_Shape& aGenV, 
   const Sweep_NumShape& aDirV)
{
  //call only in construction mode with copy.
  Standard_ConstructionError_Raise_if
    (!myCopy,"BRepSweep_Translation::MakeEmptyVertex");


Really, problem (exception) occurs during history building and was caused by an attempt to obtain generated shape for subshape, which was really "deleted" by algorithm - this input subshape and its possible generated shape was not used in result.
To remove exception it is necessary to treat correctly "deleted" shapes in history - to add standard method "IsDeleted(...)" for rotation and translation algorithms.
bugs moddata_2 bug65
bugs modalg_7 bug30346_1
bugs modalg_7 bug30346_2
No tags attached.
related to 0029181assigned apn Open CASCADE Jenkins Certification Tool - testing with enabled exceptions (undefined No_Exception) 
related to 0031031reviewed bugmaster Community Incorrect result is returned from BRepPrimAPI_MakePrism::Generated() 
Issue History
2018-11-06 18:04kgvNew Issue
2018-11-06 18:04kgvAssigned To => msv
2018-11-06 18:04kgvRelationship addedchild of 0000065
2018-11-06 18:05kgvRelationship addedrelated to 0029181
2018-11-06 18:05kgvProduct Version7.3.0 => 5.0.0
2018-11-06 18:32msvNote Added: 0080788
2018-11-06 18:33msvNote Added: 0080789
2018-11-06 18:33msvAssigned Tomsv => ifv
2018-11-06 18:33msvStatusnew => feedback
2018-11-15 08:48ifvAssigned Toifv => msv
2018-11-15 08:49ifvNote Added: 0081101
2018-11-15 09:27msvNote Added: 0081103
2018-11-15 09:27msvAssigned Tomsv => ifv
2018-11-15 09:27msvStatusfeedback => assigned
2018-12-21 11:38gitNote Added: 0081582
2018-12-25 15:24gitNote Added: 0081622
2018-12-27 10:45ifvNote Added: 0081636
2018-12-27 10:45ifvAssigned Toifv => msv
2018-12-27 10:45ifvStatusassigned => resolved
2018-12-27 10:45ifvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20510#r20510
2018-12-27 11:55msvNote Added: 0081640
2018-12-27 11:55msvAssigned Tomsv => ifv
2018-12-27 11:55msvStatusresolved => assigned
2018-12-27 12:03msvNote Added: 0081641
2018-12-28 11:24gitNote Added: 0081646
2018-12-28 11:29ifvNote Added: 0081647
2018-12-28 11:29ifvAssigned Toifv => msv
2018-12-28 11:29ifvStatusassigned => resolved
2018-12-28 11:34ifvDescription Updatedbug_revision_view_page.php?rev_id=20512#r20512
2018-12-28 11:51msvNote Added: 0081648
2018-12-28 11:51msvAssigned Tomsv => bugmaster
2018-12-28 11:51msvStatusresolved => reviewed
2018-12-28 15:52bugmasterNote Added: 0081649
2018-12-28 15:52bugmasterStatusreviewed => tested
2018-12-28 15:53bugmasterTest case number => bugs/modalg_7/bug30346_1, bugs/modalg_7/bug30346_2
2018-12-30 14:54bugmasterChangeset attached => occt master 80eeb3ce
2018-12-30 14:54bugmasterStatustested => verified
2018-12-30 14:54bugmasterResolutionopen => fixed
2018-12-30 14:58gitNote Added: 0081658
2019-10-07 08:13emvRelationship addedrelated to 0031031

Notes
(0080788)
msv   
2018-11-06 18:32   
I propose to eliminate exception in the method MakeEmptyVertex() in both classes BRepSweep_Translation and BRepSweep_Rotation.
(0080789)
msv   
2018-11-06 18:33   
Dear Igor, what is your opinion?
(0081101)
ifv   
2018-11-15 08:49   
I agree with you
(0081103)
msv   
2018-11-15 09:27   
Please do it.
(0081582)
git   
2018-12-21 11:38   
Branch CR30346 has been created by ifv.

SHA-1: 8e30c2e11942b4a1a83b882783f2ef743013cce7


Detailed log of new commits:

Author: ifv
Date: Mon Dec 10 15:48:55 2018 +0300

    0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation::MakeEmptyVertex"
    
    Implementation of method "IsDeleted(...)" for MakeRevol and MakePrism algorithms
(0081622)
git   
2018-12-25 15:24   
Branch CR30346 has been updated forcibly by ifv.

SHA-1: 411a60079618d89f457257c180bf60ebb2c3c791
(0081636)
ifv   
2018-12-27 10:45   
Branch CR30346 is reday for review.
Test results: CR30346-master-IFV
(0081640)
msv   
2018-12-27 11:55   
I see no relation between planned fix:

> eliminate exception in the method MakeEmptyVertex() in both classes
> BRepSweep_Translation and BRepSweep_Rotation

and the done fix:

> Implementation of method "IsDeleted(...)" for MakeRevol and
> MakePrism algorithms).

What is about the initial bug?

More remarks:

src/BRepSweep/BRepSweep_Prism.hxx
- 87: description of the method GenIsUsed() seams to be not correct in compare with BRepSweep_NumLinearRegularSweep, which implementation is called.

src/BRepSweep/BRepSweep_Prism.cxx
- 199: the method GenIsUsed is commented as IsBuilt.

src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx
- 525,576: protect against exception if iGenS==0.
(0081641)
msv   
2018-12-27 12:03   
The test bugs/moddata_2/bug65 is still bad. Can we adopt it to make it good?
Checkshape reports error that the second shell in the result is empty. May be it is needed not to pass the second shape (wire) of the initial shape to the revol algorithm?
(0081646)
git   
2018-12-28 11:24   
Branch CR30346 has been updated forcibly by ifv.

SHA-1: 1f294967a0733c33ad4510c6804d7aee92098f2d
(0081647)
ifv   
2018-12-28 11:29   
CR30346 is updated

Problem (exception) occurs during history building and was caused by an attempt to obtain generated shape for subshape, which was really "deleted" by algorithm - this input subshape and its possible generated shape was not used in result.
(0081648)
msv   
2018-12-28 11:51   
Reviewed.
(0081649)
bugmaster   
2018-12-28 15:52   
Combination -
OCCT branch : CR30346 SHA - 411a60079618d89f457257c180bf60ebb2c3c791
Products branch : master SHA - 4b92b1495aa4777a767cfbc88afc00a4e9fb1b5f
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16357.570000000016 / 16359.79999999999 [-0.01%]
Products
Total CPU difference: 7164.300000000043 / 7165.4900000000225 [-0.02%]
Windows-64-VC14:
OCCT
Total CPU difference: 17796.953125 / 17811.34375 [-0.08%]
Products
Total CPU difference: 8607.125 / 8697.84375 [-1.04%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0081658)
git   
2018-12-30 14:58   
Branch CR30346 has been deleted by inv.

SHA-1: 1f294967a0733c33ad4510c6804d7aee92098f2d