View Issue Details

IDProjectCategoryView StatusLast Update
0023954CommunityOCCT:Modeling Algorithmspublic2022-11-02 13:52
ReporterRoman Lygin Assigned Toabulyche  
PrioritynormalSeverityminor 
Status verifiedResolutionfixed 
Target Version7.7.0 
Summary0023954: Modeling Algorithms - 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)

git

2022-09-09 13:21

administrator   ~0110903

Branch CR23954 has been created by abulychev-ext.

SHA-1: fe081bb53ab9b712efad8ccea5184a521fe01178


Detailed log of new commits:

Author: abulyche
Date: Fri Sep 9 13:21:03 2022 +0300

    0023954: Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case
    
    Fixed the Toroidal surface recognition;
    The test case bugs/modalg_5/bug23954: BAD -> OK.

git

2022-10-06 16:34

administrator   ~0111414

Branch CR23954 has been updated forcibly by abulychev-ext.

SHA-1: e7bbfab55f187bf209846516b277542efe67dd79

git

2022-10-10 16:24

administrator   ~0111459

Branch CR23954 has been updated forcibly by abulychev-ext.

SHA-1: 19d9c3ff359d6ecd112dd07f8f86de548062c051

abulychev-ext

2022-10-11 01:07

developer   ~0111469

Branch for review:
Products - CR23954

Results: http://jenkins-test-occt.nnov.opencascade.com/view/CR23954-master-abulychev-ext/

ifv

2022-10-11 12:59

developer   ~0111482

Branch CR23954 seems to be valid

git

2022-11-02 13:52

administrator   ~0111843

Branch CR23954 has been deleted by mnt.

SHA-1: 19d9c3ff359d6ecd112dd07f8f86de548062c051

Related Changesets

occt: master 259b9303

2022-09-09 13:21:03

abulyche


Committer: smoskvin Details Diff
0023954: Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case

Fixed the Toroidal surface recognition;
The test case bugs/moddata_1/bug22296: the result is a torus with parameters: u [0, 2*PI], v [PI, 3*PI];
The test case bugs/modalg_5/bug23954: BAD -> OK.
Affected Issues
0023954
mod - src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx Diff File
mod - tests/bugs/modalg_5/bug23954 Diff File
mod - tests/bugs/moddata_1/bug22296 Diff File

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
2022-07-21 07:47 azv Assigned To msv => abulychev-ext
2022-09-09 13:05 abulychev-ext Summary BRepPrimAPI_MakeRevol fails to recognize a torus case => Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case
2022-09-09 13:21 git Note Added: 0110903
2022-10-06 16:34 git Note Added: 0111414
2022-10-10 16:24 git Note Added: 0111459
2022-10-11 01:07 abulychev-ext Note Added: 0111469
2022-10-11 01:07 abulychev-ext Assigned To abulychev-ext => ifv
2022-10-11 01:07 abulychev-ext Status assigned => resolved
2022-10-11 12:59 ifv Assigned To ifv => bugmaster
2022-10-11 12:59 ifv Status resolved => reviewed
2022-10-11 12:59 ifv Note Added: 0111482
2022-11-02 13:40 smoskvin Status reviewed => tested
2022-11-02 13:46 smoskvin Changeset attached => occt master 259b9303
2022-11-02 13:46 abulyche Assigned To bugmaster => abulyche
2022-11-02 13:46 abulyche Status tested => verified
2022-11-02 13:46 abulyche Resolution open => fixed
2022-11-02 13:52 git Note Added: 0111843