View Issue Details

IDProjectCategoryView StatusLast Update
0023954CommunityOCCT:Modeling Algorithmspublic2021-08-29 18:52
ReporterRoman Lygin Assigned Tomsv  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Target Version7.7.0 
Summary0023954: BRepPrimAPI_MakeRevol fails to recognize a torus case
DescriptionAdaptor3d_SurfaceOfRevolution::GetType() applies wrong logic to recognize a torus case. Instead of a simple case when rotation axis lies in the circle plane (and does not coincide with its center) it attempts to apply more sophisticated logic which apparently never returns torus (with a single exception when
Distance = aRadius + epsilon

Also the logic to compute a point with 0. parameter on a circle is wrong as the circle can have arbitrary orientation.

The torus should be created regardless even if a Distance < aRadius. This would be a lemon-like torus which is well supported by Open CASCADE.

The fix should be straightforward:
    if (!C.Position().IsCoplanar(myAxis, TolConf, TolAng)) {
      return bRet;
    }
    else if(aLin.Distance(aLC) <= TolConf) {
      bRet=GeomAbs_Sphere;
      return bRet;
    }
    else {
      bRet=GeomAbs_Torus;
      return bRet;
    }

However it is not integrated into OCC git - apparently it was tested and declined (based on the comment
//bRet=GeomAbs_Torus;
//return bRet;
//modified by NIZNHY-PKV Thu Feb 24 09:52:29 2011t)

So the OCC team should verify against the #22646 (for which access is denied)


See also reproducers.
Steps To Reproducecircle c_1 0 100 0 1 0 0 0 1 0 100
circle c_2 0 100 0 1 0 0 0 0 1 100
circle c_3 0 100 0 1 0 0 0 -1 0 100
circle c_4 0 100 0 1 0 0 0 0 1 10
circle c_5 0 100 0 1 0 0 0 0 1 120
for {set i 1} {$i<=5} {incr i} {mkedge e c_$i; revol r e 0 0 0 0 0 1 90; mksurf s_$i r}
dump s_$i and verify that they are all torii
TagsNo tags attached.
Test case numberbugs modalg_5 bug23954

Attached Files

  • bug23954 (713 bytes)

Activities

bugmaster

2014-01-29 17:42

administrator   ~0027698

Problem is reproduced
Test case is required

apn

2014-03-17 15:55

administrator   ~0028302

Test case is bugs/modalg_5/bug23954.

nbv

2015-04-10 17:35

developer   ~0039603

Dear Andrei,

The result seems to be OK on the current MASTER.

abv

2015-04-10 17:50

manager   ~0039606

Last edited: 2015-04-10 17:51

Please check if test case is OK

nbv

2015-04-10 17:55

developer   ~0039607

Small remark!

Result is "surface of revolution" (not Toroidal surface).
Nevertheless, it is not the reason to consider, that it is not valid.

msv

2015-04-13 10:40

developer   ~0039618

The test case bugs/modalg_5/bug23954 does not conform to the bug description. It must be updated so that the output of each "dump" is checked against toroidal surface type, and presence of SurfaceOfRevolution instead of Toroidal must be considered as an error.

apn

2015-04-21 13:20

administrator   ~0040072

Last edited: 2015-04-21 13:22

Test case bugs modalg_5 bug23954 was updated and it'll be pushed to the next IR and integrated to master (marked with TODO, will be modified when correct output will get).

apn

2015-04-21 13:21

administrator  

bug23954 (713 bytes)

Issue History

Date Modified Username Field Change
2013-05-11 12:39 Roman Lygin New Issue
2013-05-11 12:39 Roman Lygin Assigned To => jgv
2014-01-29 17:42 bugmaster Note Added: 0027698
2014-01-29 17:42 bugmaster Assigned To jgv => apn
2014-01-29 17:42 bugmaster Status new => assigned
2014-03-17 15:55 apn Note Added: 0028302
2014-03-17 15:55 apn Test case number => bugs modalg_5 bug23954
2014-03-17 15:55 apn Assigned To apn => jgv
2014-09-12 14:43 abv Target Version => 7.1.0
2015-04-10 17:35 nbv Note Added: 0039603
2015-04-10 17:35 nbv Assigned To jgv => abv
2015-04-10 17:35 nbv Status assigned => feedback
2015-04-10 17:50 abv Note Added: 0039606
2015-04-10 17:50 abv Assigned To abv => apn
2015-04-10 17:50 abv Target Version 7.1.0 => 6.9.0
2015-04-10 17:51 abv Note Edited: 0039606
2015-04-10 17:55 nbv Note Added: 0039607
2015-04-10 18:35 abv Assigned To apn => msv
2015-04-10 18:35 abv Target Version 6.9.0 => 7.1.0
2015-04-13 10:40 msv Note Added: 0039618
2015-04-13 10:40 msv Assigned To msv => apn
2015-04-13 10:40 msv Status feedback => assigned
2015-04-21 13:20 apn Note Added: 0040072
2015-04-21 13:21 apn File Added: bug23954
2015-04-21 13:22 apn Note Edited: 0040072
2015-04-21 13:23 apn Assigned To apn => msv
2016-10-28 17:52 msv Target Version 7.1.0 => 7.2.0
2017-07-21 11:22 msv Target Version 7.2.0 => 7.3.0
2017-12-05 17:09 msv Target Version 7.3.0 => 7.4.0
2019-08-12 16:44 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:55 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:52 msv Target Version 7.6.0 => 7.7.0