View Issue Details

IDProjectCategoryView StatusLast Update
0026148CommunityOCCT:Modeling Datapublic2015-05-14 16:38
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2013 
Target Version6.9.0Fixed in Version6.9.0 
Summary0026148: BRep_Tool::IsClosed failed to judge a closed edge on Poly_Triangulation.
DescriptionStandard_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;
}
Steps To ReproduceNot needed.
TagsNo tags attached.
Test case numberNot needed

Activities

git

2015-04-30 12:39

administrator   ~0040471

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.

msv

2015-04-30 12:51

developer   ~0040472

Reviewed.

mkv

2015-05-05 14:59

tester   ~0040558

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.

git

2015-05-14 16:38

administrator   ~0041121

Branch CR26148 has been deleted by inv.

SHA-1: 40880eb994680e8056daa4bd10e046f149086b8b

Related Changesets

occt: master ff0a70a1

2015-04-30 09:37:07

msv


Committer: bugmaster Details Diff
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.
Affected Issues
0026148
mod - src/BRep/BRep_Tool.cdl Diff File
mod - src/BRep/BRep_Tool.cxx Diff File

Issue History

Date Modified Username Field Change
2015-04-25 05:55 Vico Liang New Issue
2015-04-25 05:55 Vico Liang Assigned To => msv
2015-04-30 12:39 git Note Added: 0040471
2015-04-30 12:39 msv Status new => assigned
2015-04-30 12:51 msv Status assigned => resolved
2015-04-30 12:51 msv Steps to Reproduce Updated
2015-04-30 12:51 msv Note Added: 0040472
2015-04-30 12:51 msv Assigned To msv => bugmaster
2015-04-30 12:51 msv Status resolved => reviewed
2015-04-30 13:36 mkv Assigned To bugmaster => mkv
2015-05-05 14:59 mkv Note Added: 0040558
2015-05-05 15:00 mkv Test case number => Not needed
2015-05-05 15:00 mkv Assigned To mkv => bugmaster
2015-05-05 15:00 mkv Status reviewed => tested
2015-05-07 11:18 bugmaster Changeset attached => occt master ff0a70a1
2015-05-07 11:18 bugmaster Status tested => verified
2015-05-07 11:18 bugmaster Resolution open => fixed
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:38 git Note Added: 0041121