MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026148Community[OCCT] OCCT:Modeling Datapublic2015-04-25 05:552015-05-14 16:38
ReporterVico Liang 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.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
Attached Files

- Relationships

-  Notes
(0040471)
git (administrator)
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 (developer)
2015-04-30 12:51

Reviewed.
(0040558)
mkv (tester)
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 (administrator)
2015-05-14 16:38

Branch CR26148 has been deleted by inv.

SHA-1: 40880eb994680e8056daa4bd10e046f149086b8b

- Related Changesets
occt: master ff0a70a1
Timestamp: 2015-04-30 09:37:07
Author: 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.
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 View Revisions
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 user533 Status verified => closed
2015-05-14 15:30 user533 Fixed in Version => 6.9.0
2015-05-14 16:38 git Note Added: 0041121


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker