MantisBT - Community
View Issue Details
0026148Community[OCCT] OCCT:Modeling Datapublic2015-04-25 05:552015-05-14 16:38
Vico Liang 
bugmaster 
normalminor 
closedfixed 
WindowsVC++ 201364 bit
 
[OCCT] 6.9.0[OCCT] 6.9.0 
Not needed
0026148: BRep_Tool::IsClosed failed to judge a closed edge on Poly_Triangulation.
Standard_Boolean BRep_Tool::IsClosed (const TopoDS_Edge& E, const Handle(Poly_Triangulation)& T) returns wrong result if the edge has its own location.

It's easy to reproduce this issue.

1. Create a cylinder.
2. Translate the cylinder to a different location.
3. Mesh the cylinder.
4. Check the seam edge with abouve function BRep_Tool::IsClosed.

The failure reason is the above the function doesn't consider the location of the Poly_Triangulation.

To fix this issue, it needs to change the method signature by adding a more argument TopLoc_Location as below:

Standard_Boolean IsClosed(const TopoDS_Edge& E, const Handle(Poly_Triangulation)& T, const TopLoc_Location& L)
{
    //TopLoc_Location l = E.Location(); // Original code
    TopLoc_Location l = L.Predivided(E.Location()); // Correction code

    // find the representation
    BRep_ListIteratorOfListOfCurveRepresentation itcr
        ((*((Handle(BRep_TEdge)*)&E.TShape()))->ChangeCurves());

    while (itcr.More()) {
        const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
        if (cr->IsPolygonOnTriangulation(T, l) &&
            cr->IsPolygonOnClosedTriangulation())
            return Standard_True;
        itcr.Next();
    }
    return Standard_False;
}
Not needed.
No tags attached.
Issue History
2015-04-25 05:55Vico LiangNew Issue
2015-04-25 05:55Vico LiangAssigned To => msv
2015-04-30 12:39gitNote Added: 0040471
2015-04-30 12:39msvStatusnew => assigned
2015-04-30 12:51msvStatusassigned => resolved
2015-04-30 12:51msvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10277#r10277
2015-04-30 12:51msvNote Added: 0040472
2015-04-30 12:51msvAssigned Tomsv => bugmaster
2015-04-30 12:51msvStatusresolved => reviewed
2015-04-30 13:36mkvAssigned Tobugmaster => mkv
2015-05-05 14:59mkvNote Added: 0040558
2015-05-05 15:00mkvTest case number => Not needed
2015-05-05 15:00mkvAssigned Tomkv => bugmaster
2015-05-05 15:00mkvStatusreviewed => tested
2015-05-07 11:18bugmasterChangeset attached => occt master ff0a70a1
2015-05-07 11:18bugmasterStatustested => verified
2015-05-07 11:18bugmasterResolutionopen => fixed
2015-05-14 15:28aivStatusverified => closed
2015-05-14 15:30aivFixed in Version => 6.9.0
2015-05-14 16:38gitNote Added: 0041121

Notes
(0040471)
git   
2015-04-30 12:39   
Branch CR26148 has been created by msv.

SHA-1: 40880eb994680e8056daa4bd10e046f149086b8b


Detailed log of new commits:

Author: msv
Date: Thu Apr 30 12:37:07 2015 +0300

    0026148: BRep_Tool::IsClosed failed to judge a closed edge on Poly_Triangulation.
    
    The method signature has been changed by adding an argument TopLoc_Location.
(0040472)
msv   
2015-04-30 12:51   
Reviewed.
(0040558)
mkv   
2015-05-05 14:59   
Dear BugMaster,
Branch CR26148 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 40880eb994680e8056daa4bd10e046f149086b8b

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 4 (4 on master)
Windows: 0 (0 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 95153858 / 94535080 [+0.65%]
Total CPU difference: 51999.31999999906 / 51017.29999999946 [+1.92%]
products component :
Total MEMORY difference: 23791015 / 23753447 [+0.16%]
Total CPU difference: 16840.560000000012 / 17120.949999999957 [-1.64%]

Testing on Windows:
occt component :
Total MEMORY difference: 57253160 / 57266605 [-0.02%]
Total CPU difference: 15786.817596899058 / 15810.95095159897 [-0.15%]
products component :
Total MEMORY difference: 15601304 / 15605919 [-0.03%]
Total CPU difference: 6157.312669699965 / 6275.40542669997 [-1.88%]

There are no differences in images found by testdiff.
(0041121)
git   
2015-05-14 16:38   
Branch CR26148 has been deleted by inv.

SHA-1: 40880eb994680e8056daa4bd10e046f149086b8b