MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023954Community[OCCT] OCCT:Modeling Algorithmspublic2013-05-11 12:392017-12-05 17:09
ReporterRoman Lygin 
Assigned Tomsv 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.4.0*Fixed in Version 
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? file icon bug23954 (713 bytes) 2015-04-21 13:21

- Relationships

-  Notes
(0027698)
bugmaster (administrator)
2014-01-29 17:42

Problem is reproduced
Test case is required
(0028302)
apn (administrator)
2014-03-17 15:55

Test case is bugs/modalg_5/bug23954.
(0039603)
nbv (developer)
2015-04-10 17:35

Dear Andrei,

The result seems to be OK on the current MASTER.
(0039606)
abv (manager)
2015-04-10 17:50
edited on: 2015-04-10 17:51

Please check if test case is OK

(0039607)
nbv (developer)
2015-04-10 17:55

Small remark!

Result is "surface of revolution" (not Toroidal surface).
Nevertheless, it is not the reason to consider, that it is not valid.
(0039618)
msv (developer)
2015-04-13 10:40

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.
(0040072)
apn (administrator)
2015-04-21 13:20
edited on: 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).


- 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 View Revisions
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 View Revisions
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*


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker